Commit 226648f6 authored by dickelbeck's avatar dickelbeck

radio button vulnerabilities

parent 6abee417
...@@ -440,13 +440,14 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyOptionsToPanel() ...@@ -440,13 +440,14 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyOptionsToPanel()
int orientation = m_Cmp->GetRotationMiroir() & ~(CMP_MIROIR_X | CMP_MIROIR_Y); int orientation = m_Cmp->GetRotationMiroir() & ~(CMP_MIROIR_X | CMP_MIROIR_Y);
// if we don't change it, the default selection of the radio box is "0".
if( orientation == CMP_ORIENT_90 ) if( orientation == CMP_ORIENT_90 )
orientationRadioBox->SetSelection( 1 ); orientationRadioBox->SetSelection( 1 );
else if( orientation == CMP_ORIENT_180 ) else if( orientation == CMP_ORIENT_180 )
orientationRadioBox->SetSelection( 2 ); orientationRadioBox->SetSelection( 2 );
else if( orientation == CMP_ORIENT_270 ) else if( orientation == CMP_ORIENT_270 )
orientationRadioBox->SetSelection( 3 ); orientationRadioBox->SetSelection( 3 );
else
orientationRadioBox->SetSelection( 0 );
int mirror = m_Cmp->GetRotationMiroir() & (CMP_MIROIR_X | CMP_MIROIR_Y); int mirror = m_Cmp->GetRotationMiroir() & (CMP_MIROIR_X | CMP_MIROIR_Y);
...@@ -460,6 +461,8 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyOptionsToPanel() ...@@ -460,6 +461,8 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyOptionsToPanel()
mirrorRadioBox->SetSelection( 2 ); mirrorRadioBox->SetSelection( 2 );
D(printf("mirror=Y,2\n");) D(printf("mirror=Y,2\n");)
} }
else
mirrorRadioBox->SetSelection( 0 );
// Positionnement de la selection normal/convert // Positionnement de la selection normal/convert
if( m_Cmp->m_Convert > 1 ) if( m_Cmp->m_Convert > 1 )
......
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
<property name="name">orientationRadioBox</property> <property name="name">orientationRadioBox</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="selection">3</property> <property name="selection">0</property>
<property name="size"></property> <property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property> <property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property> <property name="subclass"></property>
......
...@@ -39,7 +39,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( ...@@ -39,7 +39,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
wxString orientationRadioBoxChoices[] = { _("0"), _("+90"), _("180"), _("-90") }; wxString orientationRadioBoxChoices[] = { _("0"), _("+90"), _("180"), _("-90") };
int orientationRadioBoxNChoices = sizeof( orientationRadioBoxChoices ) / sizeof( wxString ); int orientationRadioBoxNChoices = sizeof( orientationRadioBoxChoices ) / sizeof( wxString );
orientationRadioBox = new wxRadioBox( this, wxID_ANY, _("Orientation (Degrees)"), wxDefaultPosition, wxDefaultSize, orientationRadioBoxNChoices, orientationRadioBoxChoices, 1, wxRA_SPECIFY_COLS ); orientationRadioBox = new wxRadioBox( this, wxID_ANY, _("Orientation (Degrees)"), wxDefaultPosition, wxDefaultSize, orientationRadioBoxNChoices, orientationRadioBoxChoices, 1, wxRA_SPECIFY_COLS );
orientationRadioBox->SetSelection( 3 ); orientationRadioBox->SetSelection( 0 );
orientationRadioBox->SetToolTip( _("Select if the component is to be rotated when drawn") ); orientationRadioBox->SetToolTip( _("Select if the component is to be rotated when drawn") );
orientationSizer->Add( orientationRadioBox, 1, wxALL, 8 ); orientationSizer->Add( orientationRadioBox, 1, wxALL, 8 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment