Comments, refactoring
This commit is contained in:
parent
d2618caabc
commit
e013f3e8c2
|
@ -49,7 +49,6 @@ class WORKSHEET_ITEM : public EDA_ITEM
|
||||||
public:
|
public:
|
||||||
WORKSHEET_ITEM( const std::string& aFileName, const std::string& aSheetName,
|
WORKSHEET_ITEM( const std::string& aFileName, const std::string& aSheetName,
|
||||||
const PAGE_INFO* aPageInfo, const TITLE_BLOCK* aTitleBlock );
|
const PAGE_INFO* aPageInfo, const TITLE_BLOCK* aTitleBlock );
|
||||||
~WORKSHEET_ITEM() {}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function SetFileName()
|
* Function SetFileName()
|
||||||
|
|
|
@ -115,6 +115,8 @@ protected:
|
||||||
MODULE* loadFootprint( const FPID& aFootprintId )
|
MODULE* loadFootprint( const FPID& aFootprintId )
|
||||||
throw( IO_ERROR, PARSE_ERROR );
|
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[];
|
static const LAYER_NUM GAL_LAYER_ORDER[];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -70,8 +70,6 @@ static const wxString DisplayModuleTextEntry( wxT( "DiModTx" ) );
|
||||||
static const wxString FastGrid1Entry( wxT( "FastGrid1" ) );
|
static const wxString FastGrid1Entry( wxT( "FastGrid1" ) );
|
||||||
static const wxString FastGrid2Entry( wxT( "FastGrid2" ) );
|
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[] =
|
const LAYER_NUM PCB_BASE_FRAME::GAL_LAYER_ORDER[] =
|
||||||
{
|
{
|
||||||
ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( SELECTION ),
|
ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( SELECTION ),
|
||||||
|
|
|
@ -139,7 +139,7 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent )
|
||||||
m_state.Save( *it );
|
m_state.Save( *it );
|
||||||
|
|
||||||
// Gather all selected items into one VIEW_GROUP
|
// 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
|
// 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
|
// 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
|
// 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)
|
// Add everything that belongs to the module (besides the module itself)
|
||||||
for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() )
|
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;
|
for( BOARD_ITEM* drawing = module->GraphicalItems().GetFirst(); drawing;
|
||||||
drawing = drawing->Next() )
|
drawing = drawing->Next() )
|
||||||
viewGroupAdd( drawing, &m_items );
|
aGroup->Add( drawing );
|
||||||
|
|
||||||
viewGroupAdd( &module->Reference(), &m_items );
|
aGroup->Add( &module->Reference() );
|
||||||
viewGroupAdd( &module->Value(), &m_items );
|
aGroup->Add( &module->Value() );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add items to the VIEW_GROUP, so they will be displayed on the overlay
|
// Add items to the VIEW_GROUP, so they will be displayed on the overlay
|
||||||
|
|
|
@ -66,7 +66,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// Adds an item to the VIEW_GROUP that holds all moved items and displays them on the overlay
|
/// 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
|
/// Changes visibility settings for items stored in a VIEW_GROUP
|
||||||
void vgSetVisibility( KiGfx::VIEW_GROUP* aGroup, bool aVisible ) const;
|
void vgSetVisibility( KiGfx::VIEW_GROUP* aGroup, bool aVisible ) const;
|
||||||
|
|
Loading…
Reference in New Issue