FEM: Post task dialog opens transaction only if none is pending. Fixes item 4 in #20263

This commit is contained in:
Stefan Tröger
2025-04-25 20:24:31 +02:00
parent 7a630f4b10
commit dcb35d0107

View File

@@ -316,9 +316,11 @@ void TaskDlgPost::appendBox(TaskPostBox* box)
void TaskDlgPost::open()
{
// a transaction is already open at creation time of the pad
QString msg = QObject::tr("Edit post processing object");
Gui::Command::openCommand(msg.toUtf8().constData());
// only open a new command if non is pending (e.g. if the object was nely created)
if (!Gui::Command::hasPendingCommand()) {
auto text = std::string("Edit ") + m_view->getObject()->Label.getValue();
Gui::Command::openCommand(text.c_str());
}
}
void TaskDlgPost::clicked(int button)