Pcbnew: point editor: minor tidy ups now everything is a behavior
This commit is contained in:
@@ -2670,16 +2670,20 @@ int PCB_POINT_EDITOR::movePoint( const TOOL_EVENT& aEvent )
|
||||
|
||||
void PCB_POINT_EDITOR::updateItem( BOARD_COMMIT* aCommit )
|
||||
{
|
||||
wxCHECK( m_editPoints, /* void */ );
|
||||
EDA_ITEM* item = m_editPoints->GetParent();
|
||||
|
||||
if( !item )
|
||||
if( !item || !m_editorBehavior )
|
||||
return;
|
||||
|
||||
if( m_editorBehavior )
|
||||
{
|
||||
wxCHECK( m_editedPoint, /* void */ );
|
||||
m_editorBehavior->UpdateItem( *m_editedPoint, *m_editPoints );
|
||||
}
|
||||
|
||||
// Perform any post-edit actions that the item may require
|
||||
|
||||
switch( item->Type() )
|
||||
{
|
||||
case PCB_TEXTBOX_T:
|
||||
@@ -2751,13 +2755,11 @@ void PCB_POINT_EDITOR::updatePoints()
|
||||
if( !item )
|
||||
return;
|
||||
|
||||
if( m_editorBehavior )
|
||||
{
|
||||
// If we have an editor behavior, let it handle the update
|
||||
m_editorBehavior->UpdatePoints( *m_editPoints );
|
||||
getView()->Update( m_editPoints.get() );
|
||||
if( !m_editorBehavior )
|
||||
return;
|
||||
}
|
||||
|
||||
m_editorBehavior->UpdatePoints( *m_editPoints );
|
||||
getView()->Update( m_editPoints.get() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user