Commit 2601099e authored by dickelbeck's avatar dickelbeck

use member function

parent 3a3b8233
...@@ -263,7 +263,7 @@ void WinEDA_PcbFrame::AutoMoveModulesOnPcb( wxDC* DC, bool PlaceModulesHorsPcb ) ...@@ -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 ) ...@@ -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 ) ...@@ -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, ...@@ -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 ) )
......
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