Commit 226648f6 authored by dickelbeck's avatar dickelbeck
Browse files

radio button vulnerabilities

parent 6abee417
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -440,13 +440,14 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyOptionsToPanel()

    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 )
        orientationRadioBox->SetSelection( 1 );
    else if( orientation == CMP_ORIENT_180 )
        orientationRadioBox->SetSelection( 2 );
    else if( orientation == CMP_ORIENT_270 )
        orientationRadioBox->SetSelection( 3 );
    else
        orientationRadioBox->SetSelection( 0 );

    int mirror = m_Cmp->GetRotationMiroir() & (CMP_MIROIR_X | CMP_MIROIR_Y);

@@ -460,6 +461,8 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyOptionsToPanel()
        mirrorRadioBox->SetSelection( 2 );
        D(printf("mirror=Y,2\n");)
    }
    else
        mirrorRadioBox->SetSelection( 0 );

    // Positionnement de la selection normal/convert
    if( m_Cmp->m_Convert > 1 )
+1 −1
Original line number Diff line number Diff line
@@ -198,7 +198,7 @@
                                                <property name="name">orientationRadioBox</property>
                                                <property name="permission">protected</property>
                                                <property name="pos"></property>
                                                <property name="selection">3</property>
                                                <property name="selection">0</property>
                                                <property name="size"></property>
                                                <property name="style">wxRA_SPECIFY_COLS</property>
                                                <property name="subclass"></property>
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
	wxString orientationRadioBoxChoices[] = { _("0"), _("+90"), _("180"), _("-90") };
	int orientationRadioBoxNChoices = sizeof( orientationRadioBoxChoices ) / sizeof( wxString );
	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") );
	
	orientationSizer->Add( orientationRadioBox, 1, wxALL, 8 );