Commit 618df99c authored by charras's avatar charras
Browse files

Rework on undo/redo and block functions: more efficient code to undo/redo...

Rework on undo/redo and block functions: more efficient code to undo/redo block move and mirror operations
parent 83be1f8a
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -137,9 +137,7 @@ void MirrorOneStruct( SCH_ITEM* DrawStruct, wxPoint& aMirrorPoint )
        else if( DrawText->m_Orient == 2 )  /* invert horizontal text*/
            DrawText->m_Orient = 0;

        px = DrawText->m_Pos;
        MirrorYPoint( px, aMirrorPoint );
        DrawText->m_Pos.x = px.x;
        MirrorYPoint( DrawText->m_Pos, aMirrorPoint );
        break;

    case TYPE_SCH_COMPONENT:
@@ -149,7 +147,7 @@ void MirrorOneStruct( SCH_ITEM* DrawStruct, wxPoint& aMirrorPoint )
        WinEDA_SchematicFrame* frame = (WinEDA_SchematicFrame*) wxGetApp().GetTopWindow();
        frame->CmpRotationMiroir( DrawLibItem, NULL, CMP_MIROIR_Y );
        MirrorYPoint( DrawLibItem->m_Pos, aMirrorPoint );
        dx -= DrawLibItem->m_Pos.x;
        dx -= DrawLibItem->m_Pos.x;     // dx,0 is the move vector for this transform

        for( int ii = 0; ii < DrawLibItem->GetFieldCount(); ii++ )
        {
+1 −0
Original line number Diff line number Diff line
@@ -374,6 +374,7 @@ void WinEDA_SchematicFrame::PutDataInPreviousState( PICKED_ITEMS_LIST* aList )
        {
            wxPoint moveVector = - aList->m_TransformPoint;
            MoveOneStruct( item, moveVector );
            aList->m_TransformPoint = moveVector;
        }
            break;