mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user