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 |
46 @param tagname: Tagname of project POU edited |
47 @param tagname: Tagname of project POU edited |
47 @param connection: True if transition value can be defined by a |
48 @param connection: True if transition value can be defined by a |
48 connection (default: True) |
49 connection (default: True) |
49 """ |
50 """ |
50 BlockPreviewDialog.__init__(self, parent, controller, tagname, |
51 BlockPreviewDialog.__init__(self, parent, controller, tagname, |
51 size=wx.Size(350, 350), title=_('Edit transition')) |
52 title=_('Edit transition')) |
52 |
53 |
53 # Init common sizers |
54 # Init common sizers |
54 self._init_sizers(2, 0, 8, None, 2, 1) |
55 self._init_sizers(2, 0, 8, None, 2, 1) |
55 |
56 |
56 # Create label for transition type |
57 # Create label for transition type |
99 self.RightGridSizer.AddWindow(self.Preview, flag=wx.GROW) |
100 self.RightGridSizer.AddWindow(self.Preview, flag=wx.GROW) |
100 |
101 |
101 # Add buttons sizer to sizers |
102 # Add buttons sizer to sizers |
102 self.MainSizer.AddSizer(self.ButtonSizer, border=20, |
103 self.MainSizer.AddSizer(self.ButtonSizer, border=20, |
103 flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT) |
104 flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT) |
|
105 |
|
106 self.Fit() |
104 |
107 |
105 # Reference radio button is default control having keyboard focus |
108 # Reference radio button is default control having keyboard focus |
106 self.TypeRadioButtons["reference"][0].SetFocus() |
109 self.TypeRadioButtons["reference"][0].SetFocus() |
107 |
110 |
108 def GetTransitionType(self): |
111 def GetTransitionType(self): |