Improve execution time of some actions.

Improve the execution time when we add, change or remove
several terminals to/from terminal strip.
This commit is contained in:
joshua
2022-06-23 21:36:24 +02:00
parent fa753449ad
commit 2a307a74da
6 changed files with 253 additions and 91 deletions

View File

@@ -239,12 +239,7 @@ void FreeTerminalEditor::on_m_move_pb_clicked()
return;
}
//Apply action with an undo command
auto parent_undo = new QUndoCommand(tr("Déplacer des bornes à un groupe de bornes"));
for (const auto &rt_ : real_t_vector) {
new AddTerminalToStripCommand(rt_, terminal_strip, parent_undo);
}
m_project->undoStack()->push(parent_undo);
m_project->undoStack()->push(new AddTerminalToStripCommand(real_t_vector, terminal_strip));
reload();
}