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 parent: Parent wx.Window of dialog for modal |
47 @param parent: Parent wx.Window of dialog for modal |
47 @param controller: Reference to project controller |
48 @param controller: Reference to project controller |
48 @param tagname: Tagname of project POU edited |
49 @param tagname: Tagname of project POU edited |
49 @param poss_div_types: Types of divergence that will be available in the dialog window |
50 @param poss_div_types: Types of divergence that will be available in the dialog window |
50 """ |
51 """ |
51 BlockPreviewDialog.__init__(self, parent, controller, tagname, |
52 BlockPreviewDialog.__init__(self, parent, controller, tagname, |
52 size=wx.Size(500, 300), |
|
53 title=_('Create a new divergence or convergence')) |
53 title=_('Create a new divergence or convergence')) |
54 |
54 |
55 # Init common sizers |
55 # Init common sizers |
56 self._init_sizers(2, 0, 7, None, 2, 1) |
56 self._init_sizers(2, 0, 7, None, 2, 1) |
57 |
57 |
100 |
100 |
101 # Add buttons sizer to sizers |
101 # Add buttons sizer to sizers |
102 self.MainSizer.AddSizer(self.ButtonSizer, border=20, |
102 self.MainSizer.AddSizer(self.ButtonSizer, border=20, |
103 flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT) |
103 flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT) |
104 |
104 |
|
105 self.Fit() |
|
106 |
105 # Selection divergence radio button is default control having keyboard |
107 # Selection divergence radio button is default control having keyboard |
106 # focus |
108 # focus |
107 self.TypeRadioButtons[focusbtn].SetFocus() |
109 self.TypeRadioButtons[focusbtn].SetFocus() |
108 |
110 |
109 def GetMinElementSize(self): |
111 def GetMinElementSize(self): |