From 9fb06f95a0c231650361ab7524bb2c14761f3602 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 16 Dec 2023 16:17:24 +0000 Subject: [PATCH] Fix msys2 build. --- common/commit.cpp | 4 ++-- include/undo_redo_container.h | 4 ++-- pcbnew/board_commit.cpp | 2 +- pcbnew/generators/pcb_tuning_pattern.cpp | 2 +- pcbnew/tools/drawing_tool.cpp | 2 +- pcbnew/tools/group_tool.cpp | 2 +- pcbnew/undo_redo.cpp | 8 ++++---- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/common/commit.cpp b/common/commit.cpp index 8b563cd642..bcbb97e1b8 100644 --- a/common/commit.cpp +++ b/common/commit.cpp @@ -189,7 +189,7 @@ CHANGE_TYPE COMMIT::convert( UNDO_REDO aType ) const { case UNDO_REDO::NEWITEM: return CHT_ADD; case UNDO_REDO::DELETED: return CHT_REMOVE; - case UNDO_REDO::GROUP: return CHT_GROUP; + case UNDO_REDO::REGROUP: return CHT_GROUP; case UNDO_REDO::UNGROUP: return CHT_UNGROUP; case UNDO_REDO::CHANGED: return CHT_MODIFY; default: wxASSERT( false ); return CHT_MODIFY; @@ -203,7 +203,7 @@ UNDO_REDO COMMIT::convert( CHANGE_TYPE aType ) const { case CHT_ADD: return UNDO_REDO::NEWITEM; case CHT_REMOVE: return UNDO_REDO::DELETED; - case CHT_GROUP: return UNDO_REDO::GROUP; + case CHT_GROUP: return UNDO_REDO::REGROUP; case CHT_UNGROUP: return UNDO_REDO::UNGROUP; case CHT_MODIFY: return UNDO_REDO::CHANGED; default: wxASSERT( false ); return UNDO_REDO::CHANGED; diff --git a/include/undo_redo_container.h b/include/undo_redo_container.h index e8c071a776..54609b1ed3 100644 --- a/include/undo_redo_container.h +++ b/include/undo_redo_container.h @@ -67,8 +67,8 @@ enum class UNDO_REDO { DRILLORIGIN, // origin changed (like CHANGED, contains the origin and a copy) GRIDORIGIN, // origin changed (like CHANGED, contains the origin and a copy) PAGESETTINGS, // page settings or title block changes - GROUP, // new group of items created (do not use GROUP to avoid collision - // with an header on msys2) + REGROUP, // new group of items created (NB: can't use GROUP because of collision + // with a header on msys2) UNGROUP // existing group destroyed (items not destroyed) }; diff --git a/pcbnew/board_commit.cpp b/pcbnew/board_commit.cpp index 1238da8db1..a586e969bd 100644 --- a/pcbnew/board_commit.cpp +++ b/pcbnew/board_commit.cpp @@ -394,7 +394,7 @@ void BOARD_COMMIT::Push( const wxString& aMessage, int aCommitFlags ) addedGroup->AddItem( boardItem ); if( !( aCommitFlags & SKIP_UNDO ) ) - undoList.PushItem( ITEM_PICKER( nullptr, boardItem, UNDO_REDO::GROUP ) ); + undoList.PushItem( ITEM_PICKER( nullptr, boardItem, UNDO_REDO::REGROUP ) ); break; diff --git a/pcbnew/generators/pcb_tuning_pattern.cpp b/pcbnew/generators/pcb_tuning_pattern.cpp index a77abdc1ef..9858d4b2a2 100644 --- a/pcbnew/generators/pcb_tuning_pattern.cpp +++ b/pcbnew/generators/pcb_tuning_pattern.cpp @@ -1341,7 +1341,7 @@ void PCB_TUNING_PATTERN::EditPush( GENERATOR_TOOL* aTool, BOARD* aBoard, BOARD_C && bounds.PointInside( track->GetEnd(), epsilon ) ) { AddItem( item ); - groupUndoList.PushItem( ITEM_PICKER( nullptr, item, UNDO_REDO::GROUP ) ); + groupUndoList.PushItem( ITEM_PICKER( nullptr, item, UNDO_REDO::REGROUP ) ); } } diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index d3a7aac0b2..86a7a2af46 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -1550,7 +1550,7 @@ int DRAWING_TOOL::PlaceImportedGraphics( const TOOL_EVENT& aEvent ) selectedItems.push_back( item ); } - groupUndoList.PushItem( ITEM_PICKER( nullptr, item, UNDO_REDO::GROUP ) ); + groupUndoList.PushItem( ITEM_PICKER( nullptr, item, UNDO_REDO::REGROUP ) ); layer = item->GetLayer(); diff --git a/pcbnew/tools/group_tool.cpp b/pcbnew/tools/group_tool.cpp index 5ebe4353eb..28a5c2b9c9 100644 --- a/pcbnew/tools/group_tool.cpp +++ b/pcbnew/tools/group_tool.cpp @@ -274,7 +274,7 @@ int GROUP_TOOL::Group( const TOOL_EVENT& aEvent ) for( EDA_ITEM* eda_item : selection ) { if( BOARD_ITEM* item = dynamic_cast( eda_item ) ) - groupList.PushItem( ITEM_PICKER( nullptr, item, UNDO_REDO::GROUP ) ); + groupList.PushItem( ITEM_PICKER( nullptr, item, UNDO_REDO::REGROUP ) ); } commit.Stage( groupList ); diff --git a/pcbnew/undo_redo.cpp b/pcbnew/undo_redo.cpp index 722fd12ff4..16fcf6c389 100644 --- a/pcbnew/undo_redo.cpp +++ b/pcbnew/undo_redo.cpp @@ -141,7 +141,7 @@ void PCB_BASE_EDIT_FRAME::saveCopyInUndoList( PICKED_ITEMS_LIST* commandToUndo, case UNDO_REDO::NEWITEM: case UNDO_REDO::DELETED: case UNDO_REDO::PAGESETTINGS: - case UNDO_REDO::GROUP: + case UNDO_REDO::REGROUP: case UNDO_REDO::UNGROUP: break; @@ -295,7 +295,7 @@ void PCB_BASE_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList ) UNDO_REDO status = aList->GetPickedItemStatus( ii ); if( status != UNDO_REDO::DELETED - && status != UNDO_REDO::GROUP + && status != UNDO_REDO::REGROUP && status != UNDO_REDO::UNGROUP && status != UNDO_REDO::DRILLORIGIN // origin markers never on board && status != UNDO_REDO::GRIDORIGIN // origin markers never on board @@ -419,7 +419,7 @@ void PCB_BASE_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList ) break; - case UNDO_REDO::GROUP: + case UNDO_REDO::REGROUP: aList->SetPickedItemStatus( UNDO_REDO::UNGROUP, ii ); if( BOARD_ITEM* boardItem = dynamic_cast( eda_item ) ) @@ -428,7 +428,7 @@ void PCB_BASE_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList ) break; case UNDO_REDO::UNGROUP: - aList->SetPickedItemStatus( UNDO_REDO::GROUP, ii ); + aList->SetPickedItemStatus( UNDO_REDO::REGROUP, ii ); if( BOARD_ITEM* boardItem = dynamic_cast( eda_item ) ) {