use member function

This commit is contained in:
dickelbeck 2007-09-09 02:27:03 +00:00
parent 3a3b8233ce
commit 2601099e96
1 changed files with 5 additions and 10 deletions

View File

@ -263,7 +263,7 @@ void WinEDA_PcbFrame::AutoMoveModulesOnPcb( wxDC* DC, bool PlaceModulesHorsPcb )
for( pt_Dmod = BaseListeModules; *pt_Dmod != NULL; pt_Dmod++ ) for( pt_Dmod = BaseListeModules; *pt_Dmod != NULL; pt_Dmod++ )
{ {
Module = *pt_Dmod; Module = *pt_Dmod;
if( Module->m_ModuleStatus & MODULE_is_LOCKED ) if( Module->IsLocked() )
continue; continue;
if( PlaceModulesHorsPcb && EdgeExists ) if( PlaceModulesHorsPcb && EdgeExists )
@ -308,10 +308,8 @@ void WinEDA_PcbFrame::FixeModule( MODULE* Module, bool Fixe )
{ {
if( Module ) /* Traitement du module */ if( Module ) /* Traitement du module */
{ {
if( Fixe ) Module->SetLocked( Fixe );
Module->m_ModuleStatus |= MODULE_is_LOCKED;
else
Module->m_ModuleStatus &= ~MODULE_is_LOCKED;
Module->Display_Infos( this ); Module->Display_Infos( this );
GetScreen()->SetModify(); GetScreen()->SetModify();
} }
@ -322,10 +320,7 @@ void WinEDA_PcbFrame::FixeModule( MODULE* Module, bool Fixe )
{ {
if( WildCompareString( ModulesMaskSelection, Module->m_Reference->m_Text ) ) if( WildCompareString( ModulesMaskSelection, Module->m_Reference->m_Text ) )
{ {
if( Fixe ) Module->SetLocked( Fixe );
Module->m_ModuleStatus |= MODULE_is_LOCKED;
else
Module->m_ModuleStatus &= ~MODULE_is_LOCKED;
GetScreen()->SetModify(); GetScreen()->SetModify();
} }
} }
@ -353,7 +348,7 @@ void WinEDA_PcbFrame::ReOrientModules( const wxString& ModuleMask,
Module = m_Pcb->m_Modules; Module = m_Pcb->m_Modules;
for( ; Module != NULL; Module = (MODULE*) Module->Pnext ) for( ; Module != NULL; Module = (MODULE*) Module->Pnext )
{ {
if( (Module->m_ModuleStatus & MODULE_is_LOCKED ) && !include_fixe ) if( Module->IsLocked() && !include_fixe )
continue; continue;
if( WildCompareString( ModuleMask, Module->m_Reference->m_Text, FALSE ) ) if( WildCompareString( ModuleMask, Module->m_Reference->m_Text, FALSE ) )