canfestival/SlaveEditor.py
author Edouard Tisserant <edouard.tisserant@gmail.com>
Wed, 16 Oct 2024 12:18:14 +0200
changeset 4030 45532de22b75
parent 3750 f62625418bff
permissions -rw-r--r--
TESTS: Update Matiec revision in GH workflow
1511
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1286
diff changeset
     1
#!/usr/bin/env python
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1286
diff changeset
     2
# -*- coding: utf-8 -*-
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1286
diff changeset
     3
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1286
diff changeset
     4
# This file is part of Beremiz, a Integrated Development Environment for
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1286
diff changeset
     5
# programming IEC 61131-3 automates supporting plcopen standard and CanFestival.
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1286
diff changeset
     6
#
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1286
diff changeset
     7
# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1286
diff changeset
     8
#
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1286
diff changeset
     9
# See COPYING file for copyrights details.
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1286
diff changeset
    10
#
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1286
diff changeset
    11
# This program is free software; you can redistribute it and/or
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1286
diff changeset
    12
# modify it under the terms of the GNU General Public License
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1286
diff changeset
    13
# as published by the Free Software Foundation; either version 2
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1286
diff changeset
    14
# of the License, or (at your option) any later version.
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1286
diff changeset
    15
#
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1286
diff changeset
    16
# This program is distributed in the hope that it will be useful,
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1286
diff changeset
    17
# but WITHOUT ANY WARRANTY; without even the implied warranty of
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1286
diff changeset
    18
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1286
diff changeset
    19
# GNU General Public License for more details.
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1286
diff changeset
    20
#
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1286
diff changeset
    21
# You should have received a copy of the GNU General Public License
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1286
diff changeset
    22
# along with this program; if not, write to the Free Software
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1286
diff changeset
    23
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    24
3750
f62625418bff automated conversion using 2to3-3.9 tool
GP Orcullo <kinsamanka@gmail.com>
parents: 1881
diff changeset
    25
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    26
import wx
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    27
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    28
from subindextable import EditingPanel
1021
939b1a1c7aa5 Fixed bug when importing NodeEditorTemplate
Laurent Bessard
parents: 920
diff changeset
    29
from nodeeditortemplate import NodeEditorTemplate
814
5743cbdff669 Integration of PLCOpenEditor into Beremiz
Laurent Bessard
parents: 777
diff changeset
    30
from editors.ConfTreeNodeEditor import ConfTreeNodeEditor
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    31
1773
38fde37c3766 clean-up: fix PEP8 E124 closing bracket does not match visual indentation
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1736
diff changeset
    32
[
38fde37c3766 clean-up: fix PEP8 E124 closing bracket does not match visual indentation
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1736
diff changeset
    33
    ID_SLAVEEDITORCONFNODEMENUNODEINFOS, ID_SLAVEEDITORCONFNODEMENUDS301PROFILE,
38fde37c3766 clean-up: fix PEP8 E124 closing bracket does not match visual indentation
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1736
diff changeset
    34
    ID_SLAVEEDITORCONFNODEMENUDS302PROFILE, ID_SLAVEEDITORCONFNODEMENUDSOTHERPROFILE,
38fde37c3766 clean-up: fix PEP8 E124 closing bracket does not match visual indentation
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1736
diff changeset
    35
    ID_SLAVEEDITORCONFNODEMENUADD,
717
1c23952dbde1 refactoring
Edouard Tisserant
parents: 680
diff changeset
    36
] = [wx.NewId() for _init_coll_ConfNodeMenu_Items in range(5)]
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    37
1773
38fde37c3766 clean-up: fix PEP8 E124 closing bracket does not match visual indentation
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1736
diff changeset
    38
[
38fde37c3766 clean-up: fix PEP8 E124 closing bracket does not match visual indentation
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1736
diff changeset
    39
    ID_SLAVEEDITORADDMENUSDOSERVER, ID_SLAVEEDITORADDMENUSDOCLIENT,
38fde37c3766 clean-up: fix PEP8 E124 closing bracket does not match visual indentation
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1736
diff changeset
    40
    ID_SLAVEEDITORADDMENUPDOTRANSMIT, ID_SLAVEEDITORADDMENUPDORECEIVE,
38fde37c3766 clean-up: fix PEP8 E124 closing bracket does not match visual indentation
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1736
diff changeset
    41
    ID_SLAVEEDITORADDMENUMAPVARIABLE, ID_SLAVEEDITORADDMENUUSERTYPE,
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    42
] = [wx.NewId() for _init_coll_AddMenu_Items in range(6)]
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    43
1736
7e61baa047f0 clean-up: fix PEP8 E302 expected 2 blank lines, found 1
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1730
diff changeset
    44
762
aaacc83aa86b Modifying canfestival plugin to following the new Beremiz confnode paradigm
laurent
parents: 738
diff changeset
    45
class SlaveEditor(ConfTreeNodeEditor, NodeEditorTemplate):
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
    46
920
1499a4d225db Replaced SplitterWindow in ConfTreeNodeEditor by Notebook
Laurent Bessard
parents: 847
diff changeset
    47
    CONFNODEEDITOR_TABS = [
1499a4d225db Replaced SplitterWindow in ConfTreeNodeEditor by Notebook
Laurent Bessard
parents: 847
diff changeset
    48
        (_("CANOpen slave"), "_create_SlaveNodeEditor")]
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
    49
920
1499a4d225db Replaced SplitterWindow in ConfTreeNodeEditor by Notebook
Laurent Bessard
parents: 847
diff changeset
    50
    def _create_SlaveNodeEditor(self, prnt):
1499a4d225db Replaced SplitterWindow in ConfTreeNodeEditor by Notebook
Laurent Bessard
parents: 847
diff changeset
    51
        self.SlaveNodeEditor = EditingPanel(prnt, self, self.Controler, self.Editable)
1499a4d225db Replaced SplitterWindow in ConfTreeNodeEditor by Notebook
Laurent Bessard
parents: 847
diff changeset
    52
        return self.SlaveNodeEditor
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
    53
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    54
    def __init__(self, parent, controler, window, editable=True):
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    55
        self.Editable = editable
762
aaacc83aa86b Modifying canfestival plugin to following the new Beremiz confnode paradigm
laurent
parents: 738
diff changeset
    56
        ConfTreeNodeEditor.__init__(self, parent, controler, window)
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    57
        NodeEditorTemplate.__init__(self, controler, window, False)
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
    58
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    59
    def __del__(self):
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    60
        self.Controler.OnCloseEditor(self)
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
    61
717
1c23952dbde1 refactoring
Edouard Tisserant
parents: 680
diff changeset
    62
    def GetConfNodeMenuItems(self):
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    63
        if self.Editable:
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    64
            add_menu = [(wx.ITEM_NORMAL, (_('SDO Server'), ID_SLAVEEDITORADDMENUSDOSERVER, '', self.OnAddSDOServerMenu)),
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    65
                        (wx.ITEM_NORMAL, (_('SDO Client'), ID_SLAVEEDITORADDMENUSDOCLIENT, '', self.OnAddSDOClientMenu)),
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    66
                        (wx.ITEM_NORMAL, (_('PDO Transmit'), ID_SLAVEEDITORADDMENUPDOTRANSMIT, '', self.OnAddPDOTransmitMenu)),
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    67
                        (wx.ITEM_NORMAL, (_('PDO Receive'), ID_SLAVEEDITORADDMENUPDORECEIVE, '', self.OnAddPDOReceiveMenu)),
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    68
                        (wx.ITEM_NORMAL, (_('Map Variable'), ID_SLAVEEDITORADDMENUMAPVARIABLE, '', self.OnAddMapVariableMenu)),
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    69
                        (wx.ITEM_NORMAL, (_('User Type'), ID_SLAVEEDITORADDMENUUSERTYPE, '', self.OnAddUserTypeMenu))]
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
    70
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    71
            profile = self.Controler.GetCurrentProfileName()
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    72
            if profile not in ("None", "DS-301"):
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    73
                other_profile_text = _("%s Profile") % profile
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    74
                add_menu.append((wx.ITEM_SEPARATOR, None))
1847
6198190bc121 explicitly mark unused variables found by pylint with _ or dummy
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1773
diff changeset
    75
                for text, _indexes in self.Manager.GetCurrentSpecificMenu():
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    76
                    add_menu.append((wx.ITEM_NORMAL, (text, wx.NewId(), '', self.GetProfileCallBack(text))))
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    77
            else:
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    78
                other_profile_text = _('Other Profile')
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
    79
845
412a9f05070f Fixing CanFestival master and slave nodeid when generating code for PLC
laurent
parents: 816
diff changeset
    80
            return [(wx.ITEM_NORMAL, (_('DS-301 Profile'), ID_SLAVEEDITORCONFNODEMENUDS301PROFILE, '', self.OnCommunicationMenu)),
717
1c23952dbde1 refactoring
Edouard Tisserant
parents: 680
diff changeset
    81
                    (wx.ITEM_NORMAL, (_('DS-302 Profile'), ID_SLAVEEDITORCONFNODEMENUDS302PROFILE, '', self.OnOtherCommunicationMenu)),
1c23952dbde1 refactoring
Edouard Tisserant
parents: 680
diff changeset
    82
                    (wx.ITEM_NORMAL, (other_profile_text, ID_SLAVEEDITORCONFNODEMENUDSOTHERPROFILE, '', self.OnEditProfileMenu)),
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    83
                    (wx.ITEM_SEPARATOR, None),
717
1c23952dbde1 refactoring
Edouard Tisserant
parents: 680
diff changeset
    84
                    (add_menu, (_('Add'), ID_SLAVEEDITORCONFNODEMENUADD))]
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    85
        return []
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
    86
717
1c23952dbde1 refactoring
Edouard Tisserant
parents: 680
diff changeset
    87
    def RefreshConfNodeMenu(self, confnode_menu):
816
079ed646266f Fix bug in canfestivel extension when Show Master Generated on Windows
laurent
parents: 814
diff changeset
    88
        if self.Editable:
079ed646266f Fix bug in canfestivel extension when Show Master Generated on Windows
laurent
parents: 814
diff changeset
    89
            confnode_menu.Enable(ID_SLAVEEDITORCONFNODEMENUDSOTHERPROFILE, False)
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    90
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    91
    def RefreshView(self):
762
aaacc83aa86b Modifying canfestival plugin to following the new Beremiz confnode paradigm
laurent
parents: 738
diff changeset
    92
        ConfTreeNodeEditor.RefreshView(self)
920
1499a4d225db Replaced SplitterWindow in ConfTreeNodeEditor by Notebook
Laurent Bessard
parents: 847
diff changeset
    93
        self.SlaveNodeEditor.RefreshIndexList()
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    94
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    95
    def RefreshCurrentIndexList(self):
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    96
        self.RefreshView()
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
    97
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    98
    def RefreshBufferState(self):
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    99
        self.ParentWindow.RefreshTitle()
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
   100
        self.ParentWindow.RefreshFileMenu()
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
   101
        self.ParentWindow.RefreshEditMenu()
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
   102
        self.ParentWindow.RefreshPageTitles()
777
daa6941fe21a Fix bug with Show Master functionality
laurent
parents: 762
diff changeset
   103
1736
7e61baa047f0 clean-up: fix PEP8 E302 expected 2 blank lines, found 1
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1730
diff changeset
   104
777
daa6941fe21a Fix bug with Show Master functionality
laurent
parents: 762
diff changeset
   105
class MasterViewer(SlaveEditor):
1286
adda406d3960 Fixed bug when displaying Master generated Object Dictionary in canfestival extension
Laurent Bessard
parents: 1021
diff changeset
   106
    SHOW_BASE_PARAMS = False
777
daa6941fe21a Fix bug with Show Master functionality
laurent
parents: 762
diff changeset
   107
    SHOW_PARAMS = False
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
   108
847
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   109
    def __init__(self, parent, controler, window, tagname):
777
daa6941fe21a Fix bug with Show Master functionality
laurent
parents: 762
diff changeset
   110
        SlaveEditor.__init__(self, parent, controler, window, False)
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
   111
847
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   112
        self.TagName = tagname
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
   113
847
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   114
    def GetTagName(self):
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   115
        return self.TagName
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
   116
847
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   117
    def GetCurrentNodeId(self):
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   118
        return None
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
   119
847
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   120
    def GetInstancePath(self):
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   121
        return self.Controler.CTNFullName() + ".generated_master"
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
   122
847
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   123
    def GetTitle(self):
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   124
        return self.GetInstancePath()
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
   125
847
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   126
    def IsViewing(self, tagname):
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   127
        return self.GetInstancePath() == tagname
1286
adda406d3960 Fixed bug when displaying Master generated Object Dictionary in canfestival extension
Laurent Bessard
parents: 1021
diff changeset
   128
adda406d3960 Fixed bug when displaying Master generated Object Dictionary in canfestival extension
Laurent Bessard
parents: 1021
diff changeset
   129
    def RefreshView(self):
adda406d3960 Fixed bug when displaying Master generated Object Dictionary in canfestival extension
Laurent Bessard
parents: 1021
diff changeset
   130
        self.SlaveNodeEditor.RefreshIndexList()