canfestival/SlaveEditor.py
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Fri, 15 Sep 2017 20:01:21 +0300
changeset 1811 4e3c78a84c64
parent 1773 38fde37c3766
child 1847 6198190bc121
permissions -rw-r--r--
add custom TextCtrl allowed to enter long integer with bounds checking

It's needed because wx.SpinCtrl supports only 'int' type. For UDINT
and (U)LINT long type is necessary.
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
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    25
import wx
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    26
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    27
from subindextable import EditingPanel
1021
939b1a1c7aa5 Fixed bug when importing NodeEditorTemplate
Laurent Bessard
parents: 920
diff changeset
    28
from nodeeditortemplate import NodeEditorTemplate
814
5743cbdff669 Integration of PLCOpenEditor into Beremiz
Laurent Bessard
parents: 777
diff changeset
    29
from editors.ConfTreeNodeEditor import ConfTreeNodeEditor
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    30
1773
38fde37c3766 clean-up: fix PEP8 E124 closing bracket does not match visual indentation
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1736
diff changeset
    31
[
38fde37c3766 clean-up: fix PEP8 E124 closing bracket does not match visual indentation
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1736
diff changeset
    32
    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
    33
    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
    34
    ID_SLAVEEDITORCONFNODEMENUADD,
717
1c23952dbde1 refactoring
Edouard Tisserant
parents: 680
diff changeset
    35
] = [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
    36
1773
38fde37c3766 clean-up: fix PEP8 E124 closing bracket does not match visual indentation
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1736
diff changeset
    37
[
38fde37c3766 clean-up: fix PEP8 E124 closing bracket does not match visual indentation
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1736
diff changeset
    38
    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
    39
    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
    40
    ID_SLAVEEDITORADDMENUMAPVARIABLE, ID_SLAVEEDITORADDMENUUSERTYPE,
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    41
] = [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
    42
1736
7e61baa047f0 clean-up: fix PEP8 E302 expected 2 blank lines, found 1
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1730
diff changeset
    43
762
aaacc83aa86b Modifying canfestival plugin to following the new Beremiz confnode paradigm
laurent
parents: 738
diff changeset
    44
class SlaveEditor(ConfTreeNodeEditor, NodeEditorTemplate):
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
    45
920
1499a4d225db Replaced SplitterWindow in ConfTreeNodeEditor by Notebook
Laurent Bessard
parents: 847
diff changeset
    46
    CONFNODEEDITOR_TABS = [
1499a4d225db Replaced SplitterWindow in ConfTreeNodeEditor by Notebook
Laurent Bessard
parents: 847
diff changeset
    47
        (_("CANOpen slave"), "_create_SlaveNodeEditor")]
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
    48
920
1499a4d225db Replaced SplitterWindow in ConfTreeNodeEditor by Notebook
Laurent Bessard
parents: 847
diff changeset
    49
    def _create_SlaveNodeEditor(self, prnt):
1499a4d225db Replaced SplitterWindow in ConfTreeNodeEditor by Notebook
Laurent Bessard
parents: 847
diff changeset
    50
        self.SlaveNodeEditor = EditingPanel(prnt, self, self.Controler, self.Editable)
1499a4d225db Replaced SplitterWindow in ConfTreeNodeEditor by Notebook
Laurent Bessard
parents: 847
diff changeset
    51
        return self.SlaveNodeEditor
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
    52
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    53
    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
    54
        self.Editable = editable
762
aaacc83aa86b Modifying canfestival plugin to following the new Beremiz confnode paradigm
laurent
parents: 738
diff changeset
    55
        ConfTreeNodeEditor.__init__(self, parent, controler, window)
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    56
        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
    57
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    58
    def __del__(self):
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    59
        self.Controler.OnCloseEditor(self)
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
    60
717
1c23952dbde1 refactoring
Edouard Tisserant
parents: 680
diff changeset
    61
    def GetConfNodeMenuItems(self):
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    62
        if self.Editable:
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    63
            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
    64
                        (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
    65
                        (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
    66
                        (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
    67
                        (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
    68
                        (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
    69
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    70
            profile = self.Controler.GetCurrentProfileName()
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    71
            if profile not in ("None", "DS-301"):
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    72
                other_profile_text = _("%s Profile") % profile
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    73
                add_menu.append((wx.ITEM_SEPARATOR, None))
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    74
                for text, indexes in self.Manager.GetCurrentSpecificMenu():
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    75
                    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
    76
            else:
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    77
                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
    78
845
412a9f05070f Fixing CanFestival master and slave nodeid when generating code for PLC
laurent
parents: 816
diff changeset
    79
            return [(wx.ITEM_NORMAL, (_('DS-301 Profile'), ID_SLAVEEDITORCONFNODEMENUDS301PROFILE, '', self.OnCommunicationMenu)),
717
1c23952dbde1 refactoring
Edouard Tisserant
parents: 680
diff changeset
    80
                    (wx.ITEM_NORMAL, (_('DS-302 Profile'), ID_SLAVEEDITORCONFNODEMENUDS302PROFILE, '', self.OnOtherCommunicationMenu)),
1c23952dbde1 refactoring
Edouard Tisserant
parents: 680
diff changeset
    81
                    (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
    82
                    (wx.ITEM_SEPARATOR, None),
717
1c23952dbde1 refactoring
Edouard Tisserant
parents: 680
diff changeset
    83
                    (add_menu, (_('Add'), ID_SLAVEEDITORCONFNODEMENUADD))]
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    84
        return []
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
    85
717
1c23952dbde1 refactoring
Edouard Tisserant
parents: 680
diff changeset
    86
    def RefreshConfNodeMenu(self, confnode_menu):
816
079ed646266f Fix bug in canfestivel extension when Show Master Generated on Windows
laurent
parents: 814
diff changeset
    87
        if self.Editable:
079ed646266f Fix bug in canfestivel extension when Show Master Generated on Windows
laurent
parents: 814
diff changeset
    88
            confnode_menu.Enable(ID_SLAVEEDITORCONFNODEMENUDSOTHERPROFILE, False)
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    89
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    90
    def RefreshView(self):
762
aaacc83aa86b Modifying canfestival plugin to following the new Beremiz confnode paradigm
laurent
parents: 738
diff changeset
    91
        ConfTreeNodeEditor.RefreshView(self)
920
1499a4d225db Replaced SplitterWindow in ConfTreeNodeEditor by Notebook
Laurent Bessard
parents: 847
diff changeset
    92
        self.SlaveNodeEditor.RefreshIndexList()
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    93
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    94
    def RefreshCurrentIndexList(self):
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    95
        self.RefreshView()
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
    96
680
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    97
    def RefreshBufferState(self):
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    98
        self.ParentWindow.RefreshTitle()
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
    99
        self.ParentWindow.RefreshFileMenu()
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
   100
        self.ParentWindow.RefreshEditMenu()
61746934df41 Adding support for integrating CanFestival plugin panels in Beremiz main frame
smarteh-dev
parents:
diff changeset
   101
        self.ParentWindow.RefreshPageTitles()
777
daa6941fe21a Fix bug with Show Master functionality
laurent
parents: 762
diff changeset
   102
1736
7e61baa047f0 clean-up: fix PEP8 E302 expected 2 blank lines, found 1
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1730
diff changeset
   103
777
daa6941fe21a Fix bug with Show Master functionality
laurent
parents: 762
diff changeset
   104
class MasterViewer(SlaveEditor):
1286
adda406d3960 Fixed bug when displaying Master generated Object Dictionary in canfestival extension
Laurent Bessard
parents: 1021
diff changeset
   105
    SHOW_BASE_PARAMS = False
777
daa6941fe21a Fix bug with Show Master functionality
laurent
parents: 762
diff changeset
   106
    SHOW_PARAMS = False
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
   107
847
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   108
    def __init__(self, parent, controler, window, tagname):
777
daa6941fe21a Fix bug with Show Master functionality
laurent
parents: 762
diff changeset
   109
        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
   110
847
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   111
        self.TagName = tagname
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
   112
847
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   113
    def GetTagName(self):
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   114
        return self.TagName
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
   115
847
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   116
    def GetCurrentNodeId(self):
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   117
        return None
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
   118
847
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   119
    def GetInstancePath(self):
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   120
        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
   121
847
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   122
    def GetTitle(self):
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   123
        return self.GetInstancePath()
1730
64d8f52bc8c8 clean-up for PEP8: fix W291 trailing whitespace
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1511
diff changeset
   124
847
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   125
    def IsViewing(self, tagname):
b157705a9024 Fix bug in generated master panel in CanFestival extension
laurent
parents: 845
diff changeset
   126
        return self.GetInstancePath() == tagname
1286
adda406d3960 Fixed bug when displaying Master generated Object Dictionary in canfestival extension
Laurent Bessard
parents: 1021
diff changeset
   127
adda406d3960 Fixed bug when displaying Master generated Object Dictionary in canfestival extension
Laurent Bessard
parents: 1021
diff changeset
   128
    def RefreshView(self):
adda406d3960 Fixed bug when displaying Master generated Object Dictionary in canfestival extension
Laurent Bessard
parents: 1021
diff changeset
   129
        self.SlaveNodeEditor.RefreshIndexList()