Fixed undo/redo display refresh for miras & dimensions (GAL).

This commit is contained in:
Maciej Suminski 2015-04-17 12:15:07 +02:00
parent 4daf9039db
commit d281d86eee
3 changed files with 6 additions and 3 deletions

View File

@ -102,8 +102,7 @@ void VIEW::Add( VIEW_ITEM* aItem )
if( m_dynamic )
aItem->viewAssign( this );
if( aItem->viewRequiredUpdate() != VIEW_ITEM::NONE )
MarkForUpdate( aItem );
aItem->ViewUpdate( VIEW_ITEM::ALL );
}
@ -119,6 +118,8 @@ void VIEW::Remove( VIEW_ITEM* aItem )
if( item != m_needsUpdate.end() )
m_needsUpdate.erase( item );
aItem->clearUpdateFlags();
}
int layers[VIEW::VIEW_MAX_LAYERS], layers_count;

View File

@ -85,7 +85,7 @@ public:
HIDDEN = 0x02 /// Item is temporarily hidden (e.g. being used by a tool). Overrides VISIBLE flag.
};
VIEW_ITEM() : m_view( NULL ), m_flags( VISIBLE ), m_requiredUpdate( ALL ),
VIEW_ITEM() : m_view( NULL ), m_flags( VISIBLE ), m_requiredUpdate( NONE ),
m_groups( NULL ), m_groupsSize( 0 ) {}
/**

View File

@ -533,6 +533,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed
MODULE* oldModule = static_cast<MODULE*>( item );
oldModule->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) );
}
view->Remove( item );
ratsnest->Remove( item );
item->SwapData( image );
@ -544,6 +545,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed
MODULE* newModule = static_cast<MODULE*>( item );
newModule->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) );
}
view->Add( item );
ratsnest->Add( item );
item->ClearFlags( SELECTED );