# HG changeset patch # User Laurent Bessard # Date 1370987444 -7200 # Node ID 92588e69d853e8111029cf7a612d605cdf812b50 # Parent 101625efb1c109eb2c1ce20ba0a94801264f861f Fixed bug in newly rewritten dialogs diff -r 101625efb1c1 -r 92588e69d853 dialogs/ConnectionDialog.py --- a/dialogs/ConnectionDialog.py Tue Jun 11 23:08:06 2013 +0200 +++ b/dialogs/ConnectionDialog.py Tue Jun 11 23:50:44 2013 +0200 @@ -72,7 +72,7 @@ for type, label in [(CONNECTOR, _('Connector')), (CONTINUATION, _('Continuation'))]: radio_button = wx.RadioButton(self, label=label, - style=(wx.RB_GROUP if first else wx.RB_SINGLE)) + style=(wx.RB_GROUP if first else 0)) radio_button.SetValue(first) self.Bind(wx.EVT_RADIOBUTTON, self.OnTypeChanged, radio_button) left_gridsizer.AddWindow(radio_button, flag=wx.GROW) @@ -110,7 +110,8 @@ self.ApplyToAllButton.SetToolTipString( _("Apply name modification to all continuations with the same name")) self.Bind(wx.EVT_BUTTON, self.OnApplyToAll, self.ApplyToAllButton) - self.ButtonSizer.AddWindow(self.ApplyToAllButton, border=10, + self.ButtonSizer.AddWindow(self.ApplyToAllButton, + border=(3 if wx.Platform == '__WXMSW__' else 10), flag=wx.LEFT) else: self.ConnectionName.ChangeValue( diff -r 101625efb1c1 -r 92588e69d853 dialogs/LDElementDialog.py --- a/dialogs/LDElementDialog.py Tue Jun 11 23:08:06 2013 +0200 +++ b/dialogs/LDElementDialog.py Tue Jun 11 23:50:44 2013 +0200 @@ -91,10 +91,12 @@ for modifier, label in zip(element_modifiers, modifiers_label): radio_button = wx.RadioButton(self, label=label, - style=(wx.RB_GROUP if first else wx.RB_SINGLE)) + style=(wx.RB_GROUP if first else 0)) radio_button.SetValue(first) self.Bind(wx.EVT_RADIOBUTTON, self.OnModifierChanged, radio_button) - left_gridsizer.AddWindow(radio_button, flag=wx.GROW) + left_gridsizer.AddWindow(radio_button, + border=(5 if not first and wx.Platform == '__WXMSW__' else 0), + flag=wx.GROW|wx.TOP) self.ModifierRadioButtons[modifier] = radio_button first = False diff -r 101625efb1c1 -r 92588e69d853 editors/Viewer.py --- a/editors/Viewer.py Tue Jun 11 23:08:06 2013 +0200 +++ b/editors/Viewer.py Tue Jun 11 23:50:44 2013 +0200 @@ -2228,7 +2228,7 @@ if dialog.ShowModal() == wx.ID_OK: id = self.GetNewId() values = dialog.GetValues() - variable = FBD_Variable(self, values["class"], values["expression"], values["vr_type"], id) + variable = FBD_Variable(self, values["class"], values["expression"], values["var_type"], id) variable.SetPosition(bbox.x, bbox.y) variable.SetSize(*self.GetScaledSize(values["width"], values["height"])) self.AddBlock(variable)