Browse Source

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

pull/4/head
Maciej Suminski 11 years ago
parent
commit
d281d86eee
  1. 5
      common/view/view.cpp
  2. 2
      include/view/view_item.h
  3. 2
      pcbnew/board_undo_redo.cpp

5
common/view/view.cpp

@ -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;

2
include/view/view_item.h

@ -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 ) {}
/**

2
pcbnew/board_undo_redo.cpp

@ -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 );

Loading…
Cancel
Save