Commit 618df99c authored by charras's avatar charras

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
......@@ -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++ )
{
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment