equal
deleted
inserted
replaced
3 |
3 |
4 # This file is part of Beremiz, a Integrated Development Environment for |
4 # This file is part of Beremiz, a Integrated Development Environment for |
5 # programming IEC 61131-3 automates supporting plcopen standard and CanFestival. |
5 # programming IEC 61131-3 automates supporting plcopen standard and CanFestival. |
6 # |
6 # |
7 # Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD |
7 # Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD |
|
8 # Copyright (C) 2017: Andrey Skvortsov <andrej.skvortzov@gmail.com> |
8 # |
9 # |
9 # See COPYING file for copyrights details. |
10 # See COPYING file for copyrights details. |
10 # |
11 # |
11 # This program is free software; you can redistribute it and/or |
12 # This program is free software; you can redistribute it and/or |
12 # modify it under the terms of the GNU General Public License |
13 # modify it under the terms of the GNU General Public License |
45 @param controller: Reference to project controller |
46 @param controller: Reference to project controller |
46 @param tagname: Tagname of project POU edited |
47 @param tagname: Tagname of project POU edited |
47 @param initial: True if step is initial (default: False) |
48 @param initial: True if step is initial (default: False) |
48 """ |
49 """ |
49 BlockPreviewDialog.__init__(self,parent, controller, tagname, |
50 BlockPreviewDialog.__init__(self,parent, controller, tagname, |
50 size=wx.Size(400, 280), title=_('Edit Step')) |
51 title=_('Edit Step')) |
51 |
52 |
52 # Init common sizers |
53 # Init common sizers |
53 self._init_sizers(2, 0, 6, None, 2, 1) |
54 self._init_sizers(2, 0, 6, None, 2, 1) |
54 |
55 |
55 # Create label for SFC step name |
56 # Create label for SFC step name |
89 self.Initial = initial |
90 self.Initial = initial |
90 |
91 |
91 # Set default name for step |
92 # Set default name for step |
92 self.StepName.ChangeValue(controller.GenerateNewName( |
93 self.StepName.ChangeValue(controller.GenerateNewName( |
93 tagname, None, "Step%d", 0)) |
94 tagname, None, "Step%d", 0)) |
|
95 |
|
96 self.Fit() |
94 |
97 |
95 # Step name text control is default control having keyboard focus |
98 # Step name text control is default control having keyboard focus |
96 self.StepName.SetFocus() |
99 self.StepName.SetFocus() |
97 |
100 |
98 def SetValues(self, values): |
101 def SetValues(self, values): |