Fix Bug #1210120 (commit rev 4280 did not fully fixed this bug)

Road map: Gerber X2 file function extension marked done in Pcbnew and Gerbview
This commit is contained in:
jean-pierre charras 2014-12-16 19:58:26 +01:00
parent 91c0868985
commit a5c5738559
2 changed files with 8 additions and 4 deletions

View File

@ -689,7 +689,7 @@ document for more information.
- None - None
**Progress:** **Progress:**
- Under investigation. - Done both in Pcbnew and Gerbview.
## Net Highlighting ## {#pcb_net_highlight} ## Net Highlighting ## {#pcb_net_highlight}
**Goal:** **Goal:**

View File

@ -300,6 +300,9 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToOptions()
{ {
wxString newname = chipnameTextCtrl->GetValue(); wxString newname = chipnameTextCtrl->GetValue();
// Save current flags which could be modified by next change settings
STATUS_FLAGS flags = m_Cmp->GetFlags();
newname.Replace( wxT( " " ), wxT( "_" ) ); newname.Replace( wxT( " " ), wxT( "_" ) );
if( newname.IsEmpty() ) if( newname.IsEmpty() )
@ -332,12 +335,9 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToOptions()
if( m_Cmp->GetUnit() ) if( m_Cmp->GetUnit() )
{ {
int unit_selection = unitChoice->GetCurrentSelection() + 1; int unit_selection = unitChoice->GetCurrentSelection() + 1;
STATUS_FLAGS flags = m_Cmp->GetFlags();
m_Cmp->SetUnitSelection( &m_Parent->GetCurrentSheet(), unit_selection ); m_Cmp->SetUnitSelection( &m_Parent->GetCurrentSheet(), unit_selection );
m_Cmp->SetUnit( unit_selection ); m_Cmp->SetUnit( unit_selection );
m_Cmp->ClearFlags();
m_Cmp->SetFlags( flags ); // Restore m_Flag modified by SetUnit()
} }
switch( orientationRadioBox->GetSelection() ) switch( orientationRadioBox->GetSelection() )
@ -374,6 +374,10 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToOptions()
m_Cmp->SetOrientation( CMP_MIRROR_Y ); m_Cmp->SetOrientation( CMP_MIRROR_Y );
break; break;
} }
// Restore m_Flag modified by SetUnit() and other change settings
m_Cmp->ClearFlags();
m_Cmp->SetFlags( flags );
} }