Revamp code, make it more simple

This commit is contained in:
joshua
2022-02-09 18:57:27 +01:00
parent ffd904749e
commit ba638f52e5
5 changed files with 36 additions and 35 deletions

View File

@@ -19,6 +19,7 @@
#include "../../qetproject.h"
#include "../terminalstrip.h"
#include "../qetgraphicsitem/element.h"
#include "../realterminal.h"
#include <QObject>
@@ -57,9 +58,13 @@ RemoveTerminalStripCommand::RemoveTerminalStripCommand(TerminalStrip *strip,
QUndoCommand *parent) :
QUndoCommand(parent),
m_strip(strip),
m_project(project),
m_elements(strip->terminalElement())
m_project(project)
{
for (const auto &real_t : strip->realTerminals())
{
if (real_t->element())
m_elements.append(real_t->element());
}
setText(QObject::tr("Supprimer un groupe de bornes"));
}