KiCad PCB EDA Suite
|
#include <sch_commit.h>
Public Member Functions | |
SCH_COMMIT (TOOL_MANAGER *aToolMgr) | |
SCH_COMMIT (EDA_DRAW_FRAME *aFrame) | |
SCH_COMMIT (SCH_TOOL_BASE< SCH_BASE_FRAME > *aFrame) | |
virtual | ~SCH_COMMIT () |
virtual void | Push (const wxString &aMessage=wxT("A commit"), int aCommitFlags=0) override |
Execute the changes. | |
virtual void | Revert () override |
Revert the commit by restoring the modified items state. | |
COMMIT & | Stage (EDA_ITEM *aItem, CHANGE_TYPE aChangeType, BASE_SCREEN *aScreen=nullptr, RECURSE_MODE aRecurse=RECURSE_MODE::NO_RECURSE) override |
Add a change of the item aItem of type aChangeType to the change list. | |
COMMIT & | Stage (std::vector< EDA_ITEM * > &container, CHANGE_TYPE aChangeType, BASE_SCREEN *aScreen=nullptr) override |
COMMIT & | Add (EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr) |
Add a new item to the model. | |
COMMIT & | Added (EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr) |
Notify observers that aItem has been added. | |
COMMIT & | Remove (EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr) |
Remove a new item from the model. | |
COMMIT & | Removed (EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr) |
COMMIT & | Modify (EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr, RECURSE_MODE aRecurse=RECURSE_MODE::NO_RECURSE) |
Modify a given item in the model. | |
COMMIT & | Modified (EDA_ITEM *aItem, EDA_ITEM *aCopy, BASE_SCREEN *aScreen=nullptr) |
Create an undo entry for an item that has been already modified. | |
virtual COMMIT & | Stage (const PICKED_ITEMS_LIST &aItems, UNDO_REDO aModFlag=UNDO_REDO::UNSPECIFIED, BASE_SCREEN *aScreen=nullptr) |
void | Unstage (EDA_ITEM *aItem, BASE_SCREEN *aScreen) |
bool | Empty () const |
int | GetStatus (EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr) |
Returns status of an item. | |
EDA_ITEM * | GetFirst () const |
Protected Member Functions | |
void | clear () |
Should be called in Push() & Revert() methods. | |
virtual void | makeEntry (EDA_ITEM *aItem, CHANGE_TYPE aType, EDA_ITEM *aCopy=nullptr, BASE_SCREEN *aScreen=nullptr) |
COMMIT_LINE * | findEntry (EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr) |
Search for an entry describing change for a particular item. | |
CHANGE_TYPE | convert (UNDO_REDO aType) const |
UNDO_REDO | convert (CHANGE_TYPE aType) const |
Protected Attributes | |
std::set< std::pair< EDA_ITEM *, BASE_SCREEN * > > | m_addedItems |
std::set< std::pair< EDA_ITEM *, BASE_SCREEN * > > | m_changedItems |
std::set< std::pair< EDA_ITEM *, BASE_SCREEN * > > | m_deletedItems |
std::vector< COMMIT_LINE > | m_entries |
Private Member Functions | |
EDA_ITEM * | undoLevelItem (EDA_ITEM *aItem) const override |
EDA_ITEM * | makeImage (EDA_ITEM *aItem) const override |
void | pushLibEdit (const wxString &aMessage, int aCommitFlags) |
void | pushSchEdit (const wxString &aMessage, int aCommitFlags) |
void | revertLibEdit () |
Private Attributes | |
TOOL_MANAGER * | m_toolMgr |
bool | m_isLibEditor |
Definition at line 44 of file sch_commit.h.
SCH_COMMIT::SCH_COMMIT | ( | TOOL_MANAGER * | aToolMgr | ) |
Definition at line 42 of file sch_commit.cpp.
References COMMIT::COMMIT(), FRAME_SCH_SYMBOL_EDITOR, EDA_BASE_FRAME::IsType(), m_isLibEditor, and m_toolMgr.
SCH_COMMIT::SCH_COMMIT | ( | EDA_DRAW_FRAME * | aFrame | ) |
Definition at line 59 of file sch_commit.cpp.
References FRAME_SCH_SYMBOL_EDITOR, TOOLS_HOLDER::GetToolManager(), EDA_BASE_FRAME::IsType(), m_isLibEditor, and m_toolMgr.
SCH_COMMIT::SCH_COMMIT | ( | SCH_TOOL_BASE< SCH_BASE_FRAME > * | aFrame | ) |
Definition at line 52 of file sch_commit.cpp.
References TOOL_BASE::GetManager(), SCH_TOOL_BASE< T >::IsSymbolEditor(), m_isLibEditor, and m_toolMgr.
|
virtual |
Definition at line 66 of file sch_commit.cpp.
|
inlineinherited |
Add a new item to the model.
Definition at line 78 of file commit.h.
References CHT_ADD, COMMIT(), and Stage().
Referenced by PCB_POINT_EDITOR::addCorner(), FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), PCB_CONTROL::AppendBoard(), MULTICHANNEL_TOOL::AutogenerateRuleAreas(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), RULE_AREA_CREATE_HELPER::commitRuleArea(), ZONE_CREATE_HELPER::commitZone(), MULTICHANNEL_TOOL::copyRuleAreaContents(), MICROWAVE_TOOL::createInductorBetween(), CONVERT_TOOL::CreateLines(), CONVERT_TOOL::CreatePolys(), EDIT_TOOL::DragArcTrack(), DRAWING_TOOL::DrawArc(), DRAWING_TOOL::DrawBezier(), DRAWING_TOOL::DrawCircle(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::DrawLine(), DRAWING_TOOL::DrawRectangle(), SCH_DRAWING_TOOLS::DrawShape(), DRAWING_TOOL::drawShape(), DRAWING_TOOL::DrawTable(), SCH_DRAWING_TOOLS::DrawTable(), DRAWING_TOOL::DrawVia(), EDIT_TOOL::Duplicate(), PCB_TUNING_PATTERN::EditFinish(), PCB_TUNING_PATTERN::EditStart(), PCB_EDIT_FRAME::ExchangeFootprint(), PAD_TOOL::explodePad(), EDIT_TOOL::FilletTracks(), API_HANDLER_PCB::handleCreateUpdateItemsInternal(), API_HANDLER_SCH::handleCreateUpdateItemsInternal(), SCH_DRAWING_TOOLS::ImportGraphics(), SCH_DRAWING_TOOLS::ImportSheet(), PCBNEW_JOBS_HANDLER::JobExportDrc(), SCH_SELECTION_TOOL::Main(), EDIT_TOOL::ModifyLines(), ARRAY_TOOL::onDialogClosed(), CONVERT_TOOL::OutsetItems(), ZONE_CREATE_HELPER::performZoneCutout(), PCB_CONTROL::placeBoardItems(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), INTERACTIVE_PLACER_BASE::PlaceItem(), PAD_TOOL::PlacePad(), DRAWING_TOOL::PlaceText(), BACK_ANNOTATE::processNetNameChange(), PCB_TUNING_PATTERN::Remove(), MULTICHANNEL_TOOL::RepeatLayout(), MULTICHANNEL_TOOL::RepeatLayout(), PCB_EDIT_FRAME::ResolveDRCExclusions(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), CONVERT_TOOL::SegmentToArc(), and BOARD_EDITOR_CONTROL::ZoneDuplicate().
|
inlineinherited |
Notify observers that aItem has been added.
Definition at line 84 of file commit.h.
References CHT_ADD, CHT_DONE, COMMIT(), and Stage().
Referenced by SCH_LINE_WIRE_BUS_TOOL::AddJunction(), BOOST_AUTO_TEST_CASE(), SCH_LINE_WIRE_BUS_TOOL::BreakSegment(), SCH_EDIT_TOOL::ChangeTextType(), TEARDROP_MANAGER::createAndAddTeardropWithMask(), SCH_MOVE_TOOL::doMoveSelection(), SCH_DRAWING_TOOLS::DrawSheet(), SCH_LINE_WIRE_BUS_TOOL::finishSegments(), SCH_MOVE_TOOL::getConnectedDragItems(), SCH_DRAWING_TOOLS::ImportSheet(), SCH_SELECTION_TOOL::Main(), SCH_EDITOR_CONTROL::Paste(), PCB_CONTROL::placeBoardItems(), SCH_DRAWING_TOOLS::PlaceSymbol(), PCB_EDIT_FRAME::RunActionPlugin(), SCH_DRAWING_TOOLS::SingleClickPlace(), and SCH_DRAWING_TOOLS::TwoClickPlace().
|
inlineprotectedinherited |
Should be called in Push() & Revert() methods.
Definition at line 157 of file commit.h.
References m_changedItems, m_deletedItems, and m_entries.
Referenced by BOARD_COMMIT::Push(), SCH_COMMIT::Push(), BOARD_COMMIT::Revert(), SCH_COMMIT::Revert(), and SCH_COMMIT::revertLibEdit().
|
protectedinherited |
Definition at line 223 of file commit.cpp.
References CHANGED, CHT_ADD, CHT_MODIFY, CHT_REMOVE, DELETED, and NEWITEM.
|
protectedinherited |
Definition at line 211 of file commit.cpp.
References CHANGED, CHT_ADD, CHT_MODIFY, CHT_REMOVE, DELETED, and NEWITEM.
|
inlineinherited |
Definition at line 137 of file commit.h.
References m_entries.
Referenced by SCH_EDIT_TOOL::AutoplaceFields(), BOOST_AUTO_TEST_CASE(), SCH_EDIT_TOOL::ChangeTextType(), SCH_EDIT_TOOL::CycleBodyStyle(), DIALOG_CLEANUP_GRAPHICS::doCleanup(), DIALOG_CLEANUP_TRACKS_AND_VIAS::doCleanup(), SCH_EDIT_TOOL::editFieldText(), EDIT_TOOL::Flip(), SCH_EDITOR_CONTROL::IncrementAnnotations(), EDIT_TOOL::JustifyText(), SCH_EDIT_TOOL::JustifyText(), SCH_POINT_EDITOR::Main(), SCH_SELECTION_TOOL::Main(), EDIT_TOOL::Mirror(), SCH_EDIT_TOOL::Mirror(), BOARD_EDITOR_CONTROL::modifyLockSelected(), HIERARCHY_PANE::onTreeEditFinished(), BOARD_COMMIT::Push(), SCH_COMMIT::Push(), SCH_COMMIT::pushSchEdit(), SCHEMATIC::RecalculateConnections(), SCH_COMMIT::revertLibEdit(), EDIT_TOOL::Rotate(), SCH_EDIT_TOOL::Rotate(), SYMBOL_EDITOR_EDIT_TOOL::Rotate(), SCH_EDIT_FRAME::SaveSymbolToSchematic(), SCH_EDIT_FRAME::SelectUnit(), SCH_EDIT_TOOL::SetAttribute(), EDIT_TOOL::Swap(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataFromWindow(), DIALOG_IMAGE_PROPERTIES::TransferDataFromWindow(), DIALOG_LABEL_PROPERTIES::TransferDataFromWindow(), DIALOG_SHAPE_PROPERTIES::TransferDataFromWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataFromWindow(), DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow(), DIALOG_TABLE_PROPERTIES::TransferDataFromWindow(), DIALOG_TABLECELL_PROPERTIES::TransferDataFromWindow(), and DIALOG_TEXT_PROPERTIES::TransferDataFromWindow().
|
protectedinherited |
Search for an entry describing change for a particular item.
Definition at line 199 of file commit.cpp.
References m_entries.
Referenced by GetStatus().
|
inlineinherited |
|
inherited |
Returns status of an item.
Definition at line 167 of file commit.cpp.
References findEntry(), COMMIT::COMMIT_LINE::m_type, and undoLevelItem().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), SCH_EDIT_TOOL::ChangeTextType(), MULTICHANNEL_TOOL::copyRuleAreaContents(), GENERATOR_TOOL::GENERATOR_TOOL(), and BOARD_EDITOR_CONTROL::modifyLockSelected().
|
protectedvirtualinherited |
Definition at line 175 of file commit.cpp.
References CHT_ADD, CHT_MODIFY, CHT_REMOVE, CHT_TYPE, m_addedItems, m_changedItems, COMMIT::COMMIT_LINE::m_copy, m_deletedItems, m_entries, COMMIT::COMMIT_LINE::m_item, COMMIT::COMMIT_LINE::m_screen, and COMMIT::COMMIT_LINE::m_type.
Referenced by Modified(), and Stage().
Implements COMMIT.
Definition at line 482 of file sch_commit.cpp.
References EDA_ITEM::Clone(), alg::contains(), SYMBOL_EDIT_FRAME::GetCurSymbol(), LIB_SYMBOL::GetDrawItems(), m_isLibEditor, and m_toolMgr.
|
inherited |
Create an undo entry for an item that has been already modified.
Definition at line 156 of file commit.cpp.
References CHT_MODIFY, COMMIT(), makeEntry(), and undoLevelItem().
Referenced by FIELDS_EDITOR_GRID_DATA_MODEL::ApplyData(), BOOST_AUTO_TEST_CASE(), DIALOG_CHANGE_SYMBOLS::processSymbols(), and Stage().
|
inlineinherited |
Modify a given item in the model.
Definition at line 106 of file commit.h.
References CHT_MODIFY, COMMIT(), NO_RECURSE, and Stage().
Referenced by PCB_POINT_EDITOR::addCorner(), SCH_POINT_EDITOR::addCorner(), SYMBOL_EDITOR_MOVE_TOOL::AlignElements(), SCH_MOVE_TOOL::AlignToGrid(), SCH_EDIT_FRAME::AnnotateSymbols(), PCB_CONTROL::AppendBoard(), BACK_ANNOTATE::applyChangelist(), SCH_EDITOR_CONTROL::AssignFootprints(), MULTICHANNEL_TOOL::AutogenerateRuleAreas(), SCH_DRAWING_TOOLS::AutoPlaceAllSheetPins(), SCH_EDIT_TOOL::AutoplaceFields(), AR_AUTOPLACER::AutoplaceFootprints(), BOOST_AUTO_TEST_CASE(), SCH_LINE_WIRE_BUS_TOOL::BreakSegment(), PCB_POINT_EDITOR::chamferCorner(), EDIT_TOOL::ChangeTrackLayer(), EDIT_TOOL::ChangeTrackWidth(), SCH_EDIT_TOOL::CleanupSheetPins(), PCB_CONTROL::CollectAndEmbed3DModels(), SYMBOL_EDITOR_EDIT_TOOL::ConvertStackedPins(), MULTICHANNEL_TOOL::copyRuleAreaContents(), SCH_EDIT_TOOL::CycleBodyStyle(), SCH_EDIT_FRAME::DeleteAnnotation(), EDIT_TOOL::DeleteItems(), SCH_EDIT_TOOL::DoDelete(), SYMBOL_EDITOR_EDIT_TOOL::DoDelete(), SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), EDIT_TOOL::doMoveSelection(), SCH_MOVE_TOOL::doMoveSelection(), SYMBOL_EDITOR_MOVE_TOOL::doMoveSelection(), doPushPadProperties(), SCH_DRAWING_TOOLS::doSyncSheetsPins(), EDIT_TOOL::DragArcTrack(), RECTANGLE_POINT_EDIT_BEHAVIOR::dragPinsOnEdge(), DRAWING_TOOL::DrawVia(), BOARD_ITEM::Duplicate(), SCH_ITEM::Duplicate(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), PCB_EDIT_FRAME::Edit_Zone_Params(), SYMBOL_EDITOR_EDIT_TOOL::editFieldProperties(), SCH_EDIT_TOOL::editFieldText(), PAD_TOOL::EditPad(), SCH_EDIT_TOOL::EditPageNumber(), SYMBOL_EDITOR_PIN_TOOL::EditPinProperties(), PCB_TUNING_PATTERN::EditStart(), PAD_TOOL::EnumeratePads(), PCB_EDIT_FRAME::ExchangeFootprint(), SYMBOL_EDITOR_EDIT_TOOL::ExplodeStackedPin(), SCH_EDITOR_CONTROL::ExportSymbolsToLibrary(), EDIT_TOOL::FilletTracks(), EDIT_TOOL::Flip(), GENERATOR_TOOL::GENERATOR_TOOL(), SCH_MOVE_TOOL::getConnectedDragItems(), API_HANDLER_PCB::handleCreateUpdateItemsInternal(), API_HANDLER_SCH::handleCreateUpdateItemsInternal(), SYMBOL_EDITOR_DRAWING_TOOLS::ImportGraphics(), EDIT_TOOL::Increment(), SCH_TOOL_BASE< T >::Increment(), SCH_EDITOR_CONTROL::IncrementAnnotations(), EDIT_TOOL::JustifyText(), SCH_EDIT_TOOL::JustifyText(), SCH_POINT_EDITOR::Main(), mergeZones(), EDIT_TOOL::Mirror(), SCH_EDIT_TOOL::Mirror(), EDIT_TOOL::ModifyLines(), BOARD_EDITOR_CONTROL::modifyLockSelected(), EDIT_TOOL::MoveExact(), moveSelectionBy(), ARRAY_TOOL::onDialogClosed(), FOOTPRINT_EDIT_FRAME::OnEditItemRequest(), DIALOG_UPDATE_SYMBOL_FIELDS::onOkButtonClicked(), HIERARCHY_PANE::onRightClick(), HIERARCHY_PANE::onTreeEditFinished(), SCH_MOVE_TOOL::orthoLineDrag(), EDIT_TOOL::PackAndMoveFootprints(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), PAD_TOOL::pastePadProperties(), SYMBOL_EDITOR_EDIT_TOOL::PinTable(), PCB_CONTROL::placeBoardItems(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), BACK_ANNOTATE::processNetNameChange(), CN_CONNECTIVITY_ALGO::propagateConnections(), SCH_EDIT_TOOL::Properties(), MULTICHANNEL_TOOL::pruneExistingGroups(), BOARD_COMMIT::Push(), SCH_COMMIT::pushSchEdit(), DIALOG_BOARD_REANNOTATE::ReannotateBoard(), PCB_POINT_EDITOR::removeCorner(), SCH_POINT_EDITOR::removeCorner(), HIERARCHY_PANE::renameIdenticalSheets(), MULTICHANNEL_TOOL::RepeatLayout(), MULTICHANNEL_TOOL::RepeatLayout(), SYMBOL_EDITOR_PIN_TOOL::RepeatPin(), SCH_FIND_REPLACE_TOOL::ReplaceAll(), SCH_FIND_REPLACE_TOOL::ReplaceAndFindNext(), EDIT_TOOL::Rotate(), SCH_EDIT_TOOL::Rotate(), SYMBOL_EDITOR_EDIT_TOOL::Rotate(), PCB_EDIT_FRAME::SaveSelectionToDesignBlock(), SCH_EDIT_FRAME::SaveSelectionToDesignBlock(), SCH_EDIT_FRAME::SaveSymbolToSchematic(), SCHEMATIC::SCHEMATIC(), SCH_EDIT_FRAME::SelectBodyStyle(), SCH_EDIT_FRAME::SelectUnit(), SCH_EDIT_FRAME::SetAltPinFunction(), DRAWING_TOOL::SetAnchor(), SCH_EDIT_TOOL::SetAttribute(), PCB_TUNING_PATTERN::ShowPropertiesDialog(), Stage(), EDIT_TOOL::Swap(), SCH_SYMBOL::SyncOtherUnits(), BOARD_EDITOR_CONTROL::TrackWidthDec(), BOARD_EDITOR_CONTROL::TrackWidthInc(), DIALOG_DIMENSION_PROPERTIES::TransferDataFromWindow(), DIALOG_EDIT_SYMBOLS_LIBID::TransferDataFromWindow(), DIALOG_IMAGE_PROPERTIES::TransferDataFromWindow(), DIALOG_JUNCTION_PROPS::TransferDataFromWindow(), DIALOG_LABEL_PROPERTIES::TransferDataFromWindow(), DIALOG_LINE_PROPERTIES::TransferDataFromWindow(), DIALOG_PAD_PROPERTIES::TransferDataFromWindow(), DIALOG_SHAPE_PROPERTIES::TransferDataFromWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataFromWindow(), DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow(), DIALOG_TABLE_PROPERTIES::TransferDataFromWindow(), DIALOG_TABLECELL_PROPERTIES::TransferDataFromWindow(), DIALOG_TARGET_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow(), DIALOG_TRACK_VIA_PROPERTIES::TransferDataFromWindow(), DIALOG_WIRE_BUS_PROPERTIES::TransferDataFromWindow(), SCH_DRAWING_TOOLS::TwoClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), DIALOG_FIELD_PROPERTIES::UpdateField(), LINE_POINT_EDIT_BEHAVIOR::UpdateItem(), PCB_TABLECELL_POINT_EDIT_BEHAVIOR::UpdateItem(), SCH_TABLECELL_POINT_EDIT_BEHAVIOR::UpdateItem(), SHAPE_GROUP_POINT_EDIT_BEHAVIOR::UpdateItem(), PCB_POINT_EDITOR::updateItem(), PCB_PROPERTIES_PANEL::valueChanged(), SCH_PROPERTIES_PANEL::valueChanged(), BOARD_EDITOR_CONTROL::ViaSizeDec(), BOARD_EDITOR_CONTROL::ViaSizeInc(), GLOBAL_EDIT_TOOL::ZonesManager(), ZONE_FILLER_TOOL::ZoneUnfill(), and ZONE_FILLER_TOOL::ZoneUnfillAll().
|
overridevirtual |
Execute the changes.
Implements COMMIT.
Definition at line 445 of file sch_commit.cpp.
References COMMIT::clear(), COMMIT::Empty(), m_isLibEditor, m_toolMgr, pushLibEdit(), pushSchEdit(), and SKIP_SET_DIRTY.
Referenced by SCH_POINT_EDITOR::addCorner(), SYMBOL_EDITOR_MOVE_TOOL::AlignElements(), SCH_MOVE_TOOL::AlignToGrid(), BACK_ANNOTATE::applyChangelist(), SCH_EDITOR_CONTROL::AssignFootprints(), SCH_DRAWING_TOOLS::AutoPlaceAllSheetPins(), SCH_EDIT_TOOL::AutoplaceFields(), SCH_EDIT_TOOL::BreakWire(), SCH_EDIT_TOOL::ChangeTextType(), SCH_EDIT_TOOL::CleanupSheetPins(), RULE_AREA_CREATE_HELPER::commitRuleArea(), SYMBOL_EDITOR_EDIT_TOOL::ConvertStackedPins(), SCH_EDIT_TOOL::CycleBodyStyle(), SCH_EDIT_FRAME::DeleteAnnotation(), SCH_EDIT_TOOL::DoDelete(), SYMBOL_EDITOR_EDIT_TOOL::DoDelete(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), SCH_DRAWING_TOOLS::doSyncSheetsPins(), SCH_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), SCH_DRAWING_TOOLS::DrawTable(), SYMBOL_EDITOR_EDIT_TOOL::editFieldProperties(), SCH_EDIT_TOOL::editFieldText(), SCH_EDIT_TOOL::EditPageNumber(), SYMBOL_EDITOR_PIN_TOOL::EditPinProperties(), SYMBOL_EDITOR_EDIT_TOOL::ExplodeStackedPin(), SCH_EDITOR_CONTROL::ExportSymbolsToLibrary(), SCH_DRAWING_TOOLS::ImportGraphics(), SYMBOL_EDITOR_DRAWING_TOOLS::ImportGraphics(), SCH_DRAWING_TOOLS::ImportSheet(), SCH_TOOL_BASE< T >::Increment(), SCH_EDITOR_CONTROL::IncrementAnnotations(), SCH_EDIT_TOOL::JustifyText(), SCH_MOVE_TOOL::Main(), SCH_POINT_EDITOR::Main(), SCH_SELECTION_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), SCH_EDIT_TOOL::Mirror(), DIALOG_ANNOTATE::OnAnnotateClick(), DIALOG_CHANGE_SYMBOLS::onOkButtonClicked(), DIALOG_UPDATE_SYMBOL_FIELDS::onOkButtonClicked(), HIERARCHY_PANE::onRightClick(), HIERARCHY_PANE::onTreeEditFinished(), SCH_EDITOR_CONTROL::Paste(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), SYMBOL_EDITOR_EDIT_TOOL::PinTable(), SCH_DRAWING_TOOLS::PlaceImage(), SCH_DRAWING_TOOLS::PlaceSymbol(), SCH_EDIT_TOOL::Properties(), SCHEMATIC::RecalculateConnections(), SCH_POINT_EDITOR::removeCorner(), SYMBOL_EDITOR_PIN_TOOL::RepeatPin(), SCH_FIND_REPLACE_TOOL::ReplaceAll(), SCH_FIND_REPLACE_TOOL::ReplaceAndFindNext(), SCH_EDIT_TOOL::Rotate(), SYMBOL_EDITOR_EDIT_TOOL::Rotate(), SCH_EDIT_FRAME::SaveSelectionToDesignBlock(), SCH_EDIT_FRAME::SaveSymbolToSchematic(), SCH_EDIT_FRAME::SelectBodyStyle(), SCH_EDIT_FRAME::SelectUnit(), SCH_EDIT_FRAME::SetAltPinFunction(), SCH_EDIT_TOOL::SetAttribute(), SCH_DRAWING_TOOLS::SingleClickPlace(), DIALOG_EDIT_SYMBOLS_LIBID::TransferDataFromWindow(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataFromWindow(), DIALOG_IMAGE_PROPERTIES::TransferDataFromWindow(), DIALOG_JUNCTION_PROPS::TransferDataFromWindow(), DIALOG_LABEL_PROPERTIES::TransferDataFromWindow(), DIALOG_LINE_PROPERTIES::TransferDataFromWindow(), DIALOG_SHAPE_PROPERTIES::TransferDataFromWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataFromWindow(), DIALOG_SYMBOL_FIELDS_TABLE::TransferDataFromWindow(), DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow(), DIALOG_TABLE_PROPERTIES::TransferDataFromWindow(), DIALOG_TABLECELL_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_WIRE_BUS_PROPERTIES::TransferDataFromWindow(), SCH_DRAWING_TOOLS::TwoClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), and SCH_PROPERTIES_PANEL::valueChanged().
|
private |
Definition at line 111 of file sch_commit.cpp.
References AS_GLOBAL, copy, COMMIT::m_entries, m_toolMgr, NO_RECURSE, LIB_SYMBOL::RunOnChildren(), EVENTS::SelectedItemsModified, SKIP_UNDO, TA_MODEL_CHANGE, and TC_MESSAGE.
Referenced by Push().
|
private |
Definition at line 156 of file sch_commit.cpp.
References KIGFX::VIEW::Add(), EDA_GROUP::AddItem(), SCH_SCREEN::Append(), AS_GLOBAL, EDA_GROUP::AsEdaItem(), CHANGED, SCH_SCREEN::CheckIfOnDrawList(), CHT_ADD, CHT_DONE, CHT_FLAGS, CHT_MODIFY, CHT_REMOVE, CHT_TYPE, EDA_ITEM::ClearFlags(), DELETED, EDA_ITEM_ALL_FLAGS, COMMIT::Empty(), ENDPOINT, SCH_EDIT_FRAME::GetCurrentSheet(), SCH_SELECTION_TOOL::GetEnteredGroup(), EDA_ITEM::GetParentGroup(), SCH_EDIT_FRAME::GetScreen(), GLOBAL_CLEANUP, group, SCH_ITEM::HasConnectivityChanges(), SCH_SHEET::HasPageNumberChanges(), SCH_ITEM::IsGroupableType(), EDA_ITEM::IsSelected(), LOCAL_CLEANUP, COMMIT::m_entries, m_toolMgr, COMMIT::Modify(), NEWITEM, NO_CLEANUP, NO_RECURSE, SCHEMATIC::OnItemsAdded(), SCHEMATIC::OnItemsChanged(), SCHEMATIC::OnItemsRemoved(), PICKED_ITEMS_LIST::PushItem(), SCH_EDIT_FRAME::RecalculateConnections(), SCHEMATIC::RefreshHierarchy(), KIGFX::VIEW::Remove(), SCH_SCREEN::Remove(), SELECTION_TOOL::RemoveItemFromSel(), SCH_ITEM::RunOnChildren(), SCH_EDIT_FRAME::SaveCopyInUndoList(), SCH_FIELD_T, SCH_LINE_T, SCH_RULE_AREA_T, SCH_SHEET_T, SCH_SYMBOL_T, SCH_ITEM::Schematic(), SELECTED, EVENTS::SelectedItemsModified, PICKED_ITEMS_LIST::SetDescription(), ITEM_PICKER::SetLink(), SKIP_UNDO, STARTPOINT, TA_MODEL_CHANGE, TC_MESSAGE, EDA_ITEM::Type(), EVENTS::UnselectedEvent, UNSPECIFIED, SCH_EDIT_FRAME::UpdateHierarchyNavigator(), SCH_EDIT_FRAME::UpdateHopOveredWires(), and SCH_EDIT_FRAME::UpdateItem().
Referenced by Push().
|
inlineinherited |
Remove a new item from the model.
Notify observers that aItem has been removed
Definition at line 90 of file commit.h.
References CHT_REMOVE, COMMIT(), and Stage().
Referenced by MULTICHANNEL_TOOL::AutogenerateRuleAreas(), BOOST_AUTO_TEST_CASE(), MULTICHANNEL_TOOL::copyRuleAreaContents(), CONVERT_TOOL::CreateLines(), CONVERT_TOOL::CreatePolys(), EDIT_TOOL::DeleteItems(), API_HANDLER_PCB::deleteItemsInternal(), SCH_EDIT_TOOL::DoDelete(), DIALOG_GLOBAL_DELETION::DoGlobalDeletions(), EDIT_TOOL::DragArcTrack(), PCB_TUNING_PATTERN::EditFinish(), PAD_TOOL::EditPad(), PCB_EDIT_FRAME::ExchangeFootprint(), API_HANDLER_PCB::handleCreateUpdateItemsInternal(), mergeZones(), EDIT_TOOL::ModifyLines(), CONVERT_TOOL::OutsetItems(), ZONE_CREATE_HELPER::performZoneCutout(), MULTICHANNEL_TOOL::pruneExistingGroups(), PCB_TUNING_PATTERN::Remove(), and PCB_POINT_EDITOR::removeCorner().
|
inlineinherited |
Definition at line 96 of file commit.h.
References CHT_DONE, CHT_REMOVE, COMMIT(), and Stage().
Referenced by BOARD::BulkRemoveStaleTeardrops(), SCH_EDIT_TOOL::ChangeTextType(), SCHEMATIC::CleanUp(), SCH_EDIT_FRAME::DeleteJunction(), SCH_MOVE_TOOL::doMoveSelection(), NETINFO_LIST::RemoveUnusedNets(), PCB_EDIT_FRAME::RunActionPlugin(), SCH_MOVE_TOOL::trimDanglingLines(), and SCH_EDIT_FRAME::TrimWire().
|
overridevirtual |
Revert the commit by restoring the modified items state.
Implements COMMIT.
Definition at line 536 of file sch_commit.cpp.
References KIGFX::VIEW::Add(), SCH_SCREEN::Append(), CHT_ADD, CHT_DONE, CHT_FLAGS, CHT_MODIFY, CHT_REMOVE, CHT_TYPE, COMMIT::clear(), EDA_ITEM::ClearSelected(), SCHEMATIC::ConnectionGraph(), copy, SCH_FIELD::GetId(), EDA_ITEM::GetParent(), SCH_SYMBOL::GetPins(), EDA_TEXT::GetText(), SCHEMATIC::Hierarchy(), EDA_ITEM::IsSelected(), COMMIT::m_entries, m_isLibEditor, m_toolMgr, NO_CLEANUP, NO_RECURSE, SCHEMATIC::OnItemsAdded(), SCHEMATIC::OnItemsChanged(), SCHEMATIC::OnItemsRemoved(), pin, SCH_SELECTION_TOOL::RebuildSelection(), SCH_EDIT_FRAME::RecalculateConnections(), REFERENCE, KIGFX::VIEW::Remove(), SCH_SCREEN::Remove(), CONNECTION_GRAPH::RemoveItem(), revertLibEdit(), SCH_ITEM::RunOnChildren(), SCH_FIELD_T, SCH_SYMBOL_T, SCH_ITEM::Schematic(), SCH_ITEM::SetConnectivityDirty(), SCH_SYMBOL::SetRef(), SCH_ITEM::SwapItemData(), EDA_ITEM::Type(), SCH_SCREEN::Update(), and SCH_SYMBOL::UpdatePins().
Referenced by SCH_EDIT_TOOL::BreakWire(), SCH_MOVE_TOOL::doMoveSelection(), SCH_DRAWING_TOOLS::ImportSheet(), SCH_MOVE_TOOL::Main(), SCH_POINT_EDITOR::Main(), SCH_SELECTION_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), SCH_EDITOR_CONTROL::Paste(), and SYMBOL_EDITOR_EDIT_TOOL::Paste().
|
private |
Definition at line 513 of file sch_commit.cpp.
References COMMIT::clear(), copy, COMMIT::Empty(), COMMIT::m_entries, m_toolMgr, TOOL_BASE::MODEL_RELOAD, SCH_SELECTION_TOOL::RebuildSelection(), and SYMBOL_EDIT_FRAME::SetCurSymbol().
Referenced by Revert().
|
virtualinherited |
Reimplemented in BOARD_COMMIT.
Definition at line 109 of file commit.cpp.
References CHANGED, COMMIT(), convert, copy, PICKED_ITEMS_LIST::GetCount(), PICKED_ITEMS_LIST::GetPickedItem(), PICKED_ITEMS_LIST::GetPickedItemLink(), PICKED_ITEMS_LIST::GetPickedItemStatus(), Modified(), Stage(), and UNSPECIFIED.
|
overridevirtual |
Add a change of the item aItem of type aChangeType to the change list.
Reimplemented from COMMIT.
Definition at line 71 of file sch_commit.cpp.
References EDA_ITEM::ClearSelected(), COMMIT::COMMIT(), group, EDA_ITEM::HasFlag(), EDA_ITEM::IsSelected(), RECURSE, SELECTED_BY_DRAG, EDA_ITEM::SetSelected(), COMMIT::Stage(), and Stage().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), SCH_MOVE_TOOL::moveSelectionToSheet(), Stage(), and Stage().
|
overridevirtual |
Reimplemented from COMMIT.
Definition at line 101 of file sch_commit.cpp.
References COMMIT::COMMIT(), and Stage().
Implements COMMIT.
Definition at line 468 of file sch_commit.cpp.
References SYMBOL_EDIT_FRAME::GetCurSymbol(), EDA_ITEM::GetParent(), EDA_ITEM::IsType(), m_isLibEditor, and m_toolMgr.
|
inherited |
Definition at line 136 of file commit.cpp.
References EDA_ITEM::IsNew(), COMMIT::COMMIT_LINE::m_copy, m_entries, COMMIT::COMMIT_LINE::m_item, and COMMIT::COMMIT_LINE::m_screen.
Referenced by BOOST_AUTO_TEST_CASE(), and SCH_EDIT_TOOL::ChangeTextType().
|
protectedinherited |
Definition at line 182 of file commit.h.
Referenced by makeEntry(), and Stage().
|
protectedinherited |
Definition at line 183 of file commit.h.
Referenced by clear(), makeEntry(), and Stage().
|
protectedinherited |
Definition at line 184 of file commit.h.
Referenced by clear(), makeEntry(), and Stage().
|
protectedinherited |
Definition at line 185 of file commit.h.
Referenced by clear(), Empty(), findEntry(), GetFirst(), makeEntry(), BOARD_COMMIT::Push(), SCH_COMMIT::pushLibEdit(), SCH_COMMIT::pushSchEdit(), BOARD_COMMIT::Revert(), SCH_COMMIT::Revert(), SCH_COMMIT::revertLibEdit(), Unstage(), and ~COMMIT().
|
private |
Definition at line 73 of file sch_commit.h.
Referenced by makeImage(), Push(), Revert(), SCH_COMMIT(), SCH_COMMIT(), SCH_COMMIT(), and undoLevelItem().
|
private |
Definition at line 72 of file sch_commit.h.
Referenced by makeImage(), Push(), pushLibEdit(), pushSchEdit(), Revert(), revertLibEdit(), SCH_COMMIT(), SCH_COMMIT(), SCH_COMMIT(), and undoLevelItem().