Fem: Use base class open and reject methods in constraint task panels
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include <Gui/Command.h>
|
||||
#include <Gui/SelectionObject.h>
|
||||
#include <Mod/Fem/App/FemConstraintSpring.h>
|
||||
#include <Mod/Part/App/PartFeature.h>
|
||||
|
||||
#include "TaskFemConstraintSpring.h"
|
||||
#include "ui_TaskFemConstraintSpring.h"
|
||||
@@ -303,21 +304,6 @@ TaskDlgFemConstraintSpring::TaskDlgFemConstraintSpring(
|
||||
|
||||
//==== calls from the TaskView ===============================================================
|
||||
|
||||
void TaskDlgFemConstraintSpring::open()
|
||||
{
|
||||
// a transaction is already open at creation time of the panel
|
||||
if (!Gui::Command::hasPendingCommand()) {
|
||||
QString msg = QObject::tr("Constraint spring");
|
||||
Gui::Command::openCommand((const char*)msg.toUtf8());
|
||||
ConstraintView->setVisible(true);
|
||||
Gui::Command::doCommand(
|
||||
Gui::Command::Doc,
|
||||
ViewProviderFemConstraint::gethideMeshShowPartStr(
|
||||
(static_cast<Fem::Constraint*>(ConstraintView->getObject()))->getNameInDocument())
|
||||
.c_str()); // OvG: Hide meshes and show parts
|
||||
}
|
||||
}
|
||||
|
||||
bool TaskDlgFemConstraintSpring::accept()
|
||||
{
|
||||
/* Note: */
|
||||
@@ -349,13 +335,4 @@ bool TaskDlgFemConstraintSpring::accept()
|
||||
return TaskDlgFemConstraint::accept();
|
||||
}
|
||||
|
||||
bool TaskDlgFemConstraintSpring::reject()
|
||||
{
|
||||
Gui::Command::abortCommand();
|
||||
Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeDocument().resetEdit()");
|
||||
Gui::Command::updateActive();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#include "moc_TaskFemConstraintSpring.cpp"
|
||||
|
||||
Reference in New Issue
Block a user