![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Undoable bulk deletion (perf-plan Phase A2): one engine swmm_*_delete_many call per kind instead of K per-object deletes. More...
#include <mapundostack.h>
Classes | |
| struct | Target |
Public Member Functions | |
| BatchDeleteCommand (SWMMModelLayer *layer, const QList< Target > &targets, MapCanvas *canvas, const QString &text) | |
| void | redo () override |
Public Member Functions inherited from BulkEditCommand | |
| BulkEditCommand (SWMMModelLayer *layer, const QString &text, QUndoCommand *parent=nullptr) | |
| void | redo () override |
| void | undo () override |
Undoable bulk deletion (perf-plan Phase A2): one engine swmm_*_delete_many call per kind instead of K per-object deletes.
The constructor creates one snapshot-only DeleteObjectCommand child per target — every snapshot is taken BEFORE anything is deleted, while all indices are still pre-batch — with setEngineAppliedByBatch(true) so the children's redo() are no-ops. redo() performs the whole deletion through SWMMModelLayer::applyDeleteMany inside the inherited BulkEdit scope; undo() is inherited: children restore per-object in reverse order (the rare direction — documented as O(K·N)).
| BatchDeleteCommand::BatchDeleteCommand | ( | SWMMModelLayer * | layer, |
| const QList< Target > & | targets, | ||
| MapCanvas * | canvas, | ||
| const QString & | text | ||
| ) |
|
override |