Commit d281d86e authored by Maciej Suminski's avatar Maciej Suminski
Browse files

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

parent 4daf9039
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -102,8 +102,7 @@ void VIEW::Add( VIEW_ITEM* aItem )
    if( m_dynamic )
    if( m_dynamic )
        aItem->viewAssign( this );
        aItem->viewAssign( this );


    if( aItem->viewRequiredUpdate() != VIEW_ITEM::NONE )
    aItem->ViewUpdate( VIEW_ITEM::ALL );
        MarkForUpdate( aItem );
}
}




@@ -119,6 +118,8 @@ void VIEW::Remove( VIEW_ITEM* aItem )


        if( item != m_needsUpdate.end() )
        if( item != m_needsUpdate.end() )
            m_needsUpdate.erase( item );
            m_needsUpdate.erase( item );

        aItem->clearUpdateFlags();
    }
    }


    int layers[VIEW::VIEW_MAX_LAYERS], layers_count;
    int layers[VIEW::VIEW_MAX_LAYERS], layers_count;
+1 −1
Original line number Original line Diff line number Diff line
@@ -85,7 +85,7 @@ public:
        HIDDEN      = 0x02      /// Item is temporarily hidden (e.g. being used by a tool). Overrides VISIBLE flag.
        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 ) {}
                  m_groups( NULL ), m_groupsSize( 0 ) {}


    /**
    /**
+2 −0
Original line number Original line Diff line number Diff line
@@ -533,6 +533,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed
                MODULE* oldModule = static_cast<MODULE*>( item );
                MODULE* oldModule = static_cast<MODULE*>( item );
                oldModule->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) );
                oldModule->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) );
            }
            }
            view->Remove( item );
            ratsnest->Remove( item );
            ratsnest->Remove( item );


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


            item->ClearFlags( SELECTED );
            item->ClearFlags( SELECTED );