Fem: Use base class open and reject methods in constraint task panels

This commit is contained in:
marioalexis
2024-06-21 14:11:42 -03:00
parent 0361543cfb
commit 6c0f3bde92
31 changed files with 23 additions and 367 deletions

View File

@@ -195,12 +195,11 @@ bool TaskFemConstraint::KeyEvent(QEvent* e)
void TaskDlgFemConstraint::open()
{
ConstraintView->setVisible(true);
Gui::Command::runCommand(
Gui::Command::Doc,
ViewProviderFemConstraint::gethideMeshShowPartStr(
(static_cast<Fem::Constraint*>(ConstraintView->getObject()))->getNameInDocument())
.c_str()); // OvG: Hide meshes and show parts
if (!Gui::Command::hasPendingCommand()) {
const char* typeName = ConstraintView->getObject()->getTypeId().getName();
Gui::Command::openCommand(typeName);
ConstraintView->setVisible(true);
}
}
bool TaskDlgFemConstraint::accept()
@@ -248,9 +247,9 @@ bool TaskDlgFemConstraint::reject()
// roll back the changes
Gui::Command::abortCommand();
Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeDocument().resetEdit()");
Gui::Command::updateActive();
return true;
}
#include "moc_TaskFemConstraint.cpp"