Fix compil warnings (UNDO_REDO::GROUP renamed to UNDO_REDO::REGROUP to fix
collision name with a widows header on msys2)
This commit is contained in:
parent
a9829a598e
commit
6c7c9ca50c
|
@ -444,7 +444,7 @@ public:
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void SetParameter(T aParam)
|
void SetParameter(T aParam)
|
||||||
{
|
{
|
||||||
m_param = (void*) aParam;
|
m_param = reinterpret_cast<void*>( aParam );
|
||||||
}
|
}
|
||||||
|
|
||||||
OPT<int> GetCommandId() const
|
OPT<int> GetCommandId() const
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 jean-pierre.charras@gipsa-lab.inpg.fr
|
* Copyright (C) 2009 jean-pierre.charras@gipsa-lab.inpg.fr
|
||||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@gmail.com>
|
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@gmail.com>
|
||||||
* Copyright (C) 2009-2020 KiCad Developers, see AUTHORS.txt for contributors.
|
* Copyright (C) 2009-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -54,22 +54,23 @@ class BASE_SCREEN;
|
||||||
* Each type must be redo/undone by a specific operation.
|
* Each type must be redo/undone by a specific operation.
|
||||||
*/
|
*/
|
||||||
enum class UNDO_REDO {
|
enum class UNDO_REDO {
|
||||||
UNSPECIFIED = 0, // illegal
|
UNSPECIFIED = 0, // illegal
|
||||||
NOP, // Undo/redo will ignore this entry. Only forces the start of a new stack
|
NOP, // Undo/redo will ignore this entry. Only forces the start of a new stack
|
||||||
CHANGED, // params of items have a value changed: undo is made by exchange
|
CHANGED, // params of items have a value changed: undo is made by exchange
|
||||||
// values with a copy of these values
|
// values with a copy of these values
|
||||||
NEWITEM, // new item, undo by changing in deleted
|
NEWITEM, // new item, undo by changing in deleted
|
||||||
DELETED, // deleted item, undo by changing in deleted
|
DELETED, // deleted item, undo by changing in deleted
|
||||||
LIBEDIT, // Specific to the component editor (symbol_editor creates a full copy
|
LIBEDIT, // Specific to the component editor (symbol_editor creates a full copy
|
||||||
// of the current component when changed)
|
// of the current component when changed)
|
||||||
LIB_RENAME, // As LIBEDIT, but old copy should be removed from library
|
LIB_RENAME, // As LIBEDIT, but old copy should be removed from library
|
||||||
EXCHANGE_T, // Use for changing the schematic text type where swapping
|
EXCHANGE_T, // Use for changing the schematic text type where swapping
|
||||||
// data structure is insufficient to restore the change.
|
// data structure is insufficient to restore the change.
|
||||||
DRILLORIGIN, // origin changed (like CHANGED, contains the origin and a copy)
|
DRILLORIGIN, // origin changed (like CHANGED, contains the origin and a copy)
|
||||||
GRIDORIGIN, // 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
|
PAGESETTINGS, // page settings or title block changes
|
||||||
GROUP,
|
REGROUP, // new group of items created (do not use GROUP to avoid collision
|
||||||
UNGROUP
|
// with an header on msys2)
|
||||||
|
UNGROUP // existing group destroyed (items not destroyed)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -279,10 +279,10 @@ int GROUP_TOOL::Group( const TOOL_EVENT& aEvent )
|
||||||
for( EDA_ITEM* item : selection )
|
for( EDA_ITEM* item : selection )
|
||||||
{
|
{
|
||||||
group->AddItem( static_cast<BOARD_ITEM*>( item ) );
|
group->AddItem( static_cast<BOARD_ITEM*>( item ) );
|
||||||
undoList.PushItem( ITEM_PICKER( nullptr, item, UNDO_REDO::GROUP ) );
|
undoList.PushItem( ITEM_PICKER( nullptr, item, UNDO_REDO::REGROUP ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_frame->SaveCopyInUndoList( undoList, UNDO_REDO::GROUP );
|
m_frame->SaveCopyInUndoList( undoList, UNDO_REDO::REGROUP );
|
||||||
}
|
}
|
||||||
|
|
||||||
selTool->ClearSelection();
|
selTool->ClearSelection();
|
||||||
|
|
|
@ -284,7 +284,7 @@ void PCB_BASE_EDIT_FRAME::SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsLis
|
||||||
case UNDO_REDO::NEWITEM:
|
case UNDO_REDO::NEWITEM:
|
||||||
case UNDO_REDO::DELETED:
|
case UNDO_REDO::DELETED:
|
||||||
case UNDO_REDO::PAGESETTINGS:
|
case UNDO_REDO::PAGESETTINGS:
|
||||||
case UNDO_REDO::GROUP:
|
case UNDO_REDO::REGROUP:
|
||||||
case UNDO_REDO::UNGROUP:
|
case UNDO_REDO::UNGROUP:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -489,13 +489,13 @@ void PCB_BASE_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList )
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UNDO_REDO::GROUP:
|
case UNDO_REDO::REGROUP:
|
||||||
aList->SetPickedItemStatus( UNDO_REDO::UNGROUP, ii );
|
aList->SetPickedItemStatus( UNDO_REDO::UNGROUP, ii );
|
||||||
static_cast<BOARD_ITEM*>( eda_item )->SetParentGroup( nullptr );
|
static_cast<BOARD_ITEM*>( eda_item )->SetParentGroup( nullptr );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UNDO_REDO::UNGROUP:
|
case UNDO_REDO::UNGROUP:
|
||||||
aList->SetPickedItemStatus( UNDO_REDO::GROUP, ii );
|
aList->SetPickedItemStatus( UNDO_REDO::REGROUP, ii );
|
||||||
|
|
||||||
if( group )
|
if( group )
|
||||||
group->AddItem( static_cast<BOARD_ITEM*>( eda_item ) );
|
group->AddItem( static_cast<BOARD_ITEM*>( eda_item ) );
|
||||||
|
|
Loading…
Reference in New Issue