Fix ghosted image while moving meander.

Also cleans up some undo description strings.  (They go in the menu
so they should be title-caps.)
This commit is contained in:
Jeff Young 2023-10-10 15:24:58 +01:00
parent d3b50f0607
commit 0683313ecb
1 changed files with 9 additions and 9 deletions

View File

@ -622,7 +622,7 @@ public:
{ {
if( li->Parent() ) if( li->Parent() )
{ {
aFrame->GetCanvas()->GetView()->Hide( li->Parent(), true ); li->Parent()->SetForcedTransparency( 1.0 );
m_removedItems.insert( li->Parent() ); m_removedItems.insert( li->Parent() );
} }
} }
@ -698,8 +698,7 @@ public:
for( BOARD_ITEM* item : m_removedItems ) for( BOARD_ITEM* item : m_removedItems )
{ {
item->ClearSelected(); item->SetForcedTransparency( 0.0 );
aFrame->GetCanvas()->GetView()->Hide( item, false );
aCommit->Remove( item ); aCommit->Remove( item );
} }
@ -707,25 +706,28 @@ public:
for( BOARD_ITEM* item : routerRemovedItems ) for( BOARD_ITEM* item : routerRemovedItems )
{ {
item->ClearSelected();
aCommit->Remove( item ); aCommit->Remove( item );
} }
for( BOARD_ITEM* item : routerAddedItems ) for( BOARD_ITEM* item : routerAddedItems )
{ {
item->SetSelected();
AddItem( item ); AddItem( item );
aCommit->Add( item ); aCommit->Add( item );
} }
} }
aCommit->Push( aCommitMsg, aCommitFlags ); if( aCommitMsg.IsEmpty() )
aCommit->Push( _( "Edit Meander" ), aCommitFlags );
else
aCommit->Push( aCommitMsg, aCommitFlags );
} }
void EditRevert( GENERATOR_TOOL* aTool, BOARD* aBoard, PCB_BASE_EDIT_FRAME* aFrame, void EditRevert( GENERATOR_TOOL* aTool, BOARD* aBoard, PCB_BASE_EDIT_FRAME* aFrame,
BOARD_COMMIT* aCommit ) override BOARD_COMMIT* aCommit ) override
{ {
for( BOARD_ITEM* item : m_removedItems ) for( BOARD_ITEM* item : m_removedItems )
aFrame->GetCanvas()->GetView()->Hide( item, false ); item->SetForcedTransparency( 0.0 );
m_removedItems.clear(); m_removedItems.clear();
@ -870,8 +872,6 @@ public:
{ {
m_origin += aMoveVector; m_origin += aMoveVector;
m_end += aMoveVector; m_end += aMoveVector;
PCB_GROUP::Move( aMoveVector );
} }
const BOX2I GetBoundingBox() const override { return GetRectShape().BBox(); } const BOX2I GetBoundingBox() const override { return GetRectShape().BBox(); }
@ -1056,7 +1056,7 @@ public:
FromMeanderSettings( settings ); FromMeanderSettings( settings );
commit.Push( _( "Edit meander properties" ) ); commit.Push( _( "Edit Meander Properties" ) );
} }
aEditFrame->GetToolManager()->PostAction<PCB_GENERATOR*>( PCB_ACTIONS::regenerateItem, aEditFrame->GetToolManager()->PostAction<PCB_GENERATOR*>( PCB_ACTIONS::regenerateItem,