Comments, refactoring
This commit is contained in:
parent
d2618caabc
commit
e013f3e8c2
|
@ -49,7 +49,6 @@ class WORKSHEET_ITEM : public EDA_ITEM
|
|||
public:
|
||||
WORKSHEET_ITEM( const std::string& aFileName, const std::string& aSheetName,
|
||||
const PAGE_INFO* aPageInfo, const TITLE_BLOCK* aTitleBlock );
|
||||
~WORKSHEET_ITEM() {}
|
||||
|
||||
/**
|
||||
* Function SetFileName()
|
||||
|
|
|
@ -115,6 +115,8 @@ protected:
|
|||
MODULE* loadFootprint( const FPID& aFootprintId )
|
||||
throw( IO_ERROR, PARSE_ERROR );
|
||||
|
||||
///> Rendering order of layers on GAL-based canvas (lower index in the array
|
||||
///> means that layer is displayed closer to the user, ie. on the top).
|
||||
static const LAYER_NUM GAL_LAYER_ORDER[];
|
||||
|
||||
public:
|
||||
|
|
|
@ -70,8 +70,6 @@ static const wxString DisplayModuleTextEntry( wxT( "DiModTx" ) );
|
|||
static const wxString FastGrid1Entry( wxT( "FastGrid1" ) );
|
||||
static const wxString FastGrid2Entry( wxT( "FastGrid2" ) );
|
||||
|
||||
/// Rendering order of layers on GAL-based canvas (lower index in the array
|
||||
/// means that layer is displayed closer to the user, ie. on the top).
|
||||
const LAYER_NUM PCB_BASE_FRAME::GAL_LAYER_ORDER[] =
|
||||
{
|
||||
ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( SELECTION ),
|
||||
|
|
|
@ -139,7 +139,7 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent )
|
|||
m_state.Save( *it );
|
||||
|
||||
// Gather all selected items into one VIEW_GROUP
|
||||
viewGroupAdd( *it, &m_items );
|
||||
vgAdd( *it, &m_items );
|
||||
}
|
||||
|
||||
// Hide the original items, they are temporarily shown in VIEW_GROUP on overlay
|
||||
|
@ -183,7 +183,7 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent )
|
|||
}
|
||||
|
||||
|
||||
void MOVE_TOOL::viewGroupAdd( BOARD_ITEM* aItem, VIEW_GROUP* aGroup )
|
||||
void MOVE_TOOL::vgAdd( BOARD_ITEM* aItem, VIEW_GROUP* aGroup )
|
||||
{
|
||||
// Modules are treated in a special way - when they are moved, we have to
|
||||
// move all the parts that make the module, not the module itself
|
||||
|
@ -193,14 +193,14 @@ void MOVE_TOOL::viewGroupAdd( BOARD_ITEM* aItem, VIEW_GROUP* aGroup )
|
|||
|
||||
// Add everything that belongs to the module (besides the module itself)
|
||||
for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() )
|
||||
viewGroupAdd( pad, &m_items );
|
||||
aGroup->Add( pad );
|
||||
|
||||
for( BOARD_ITEM* drawing = module->GraphicalItems().GetFirst(); drawing;
|
||||
drawing = drawing->Next() )
|
||||
viewGroupAdd( drawing, &m_items );
|
||||
aGroup->Add( drawing );
|
||||
|
||||
viewGroupAdd( &module->Reference(), &m_items );
|
||||
viewGroupAdd( &module->Value(), &m_items );
|
||||
aGroup->Add( &module->Reference() );
|
||||
aGroup->Add( &module->Value() );
|
||||
}
|
||||
|
||||
// Add items to the VIEW_GROUP, so they will be displayed on the overlay
|
||||
|
|
|
@ -66,7 +66,7 @@ public:
|
|||
|
||||
private:
|
||||
/// Adds an item to the VIEW_GROUP that holds all moved items and displays them on the overlay
|
||||
void viewGroupAdd( BOARD_ITEM* aItem, KiGfx::VIEW_GROUP* aGroup );
|
||||
void vgAdd( BOARD_ITEM* aItem, KiGfx::VIEW_GROUP* aGroup );
|
||||
|
||||
/// Changes visibility settings for items stored in a VIEW_GROUP
|
||||
void vgSetVisibility( KiGfx::VIEW_GROUP* aGroup, bool aVisible ) const;
|
||||
|
|
Loading…
Reference in New Issue