Fem: Use base class open and reject methods in constraint task panels
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include <Gui/QuantitySpinBox.h>
|
||||
#include <Gui/SelectionObject.h>
|
||||
#include <Mod/Fem/App/FemConstraintTemperature.h>
|
||||
#include <Mod/Part/App/PartFeature.h>
|
||||
|
||||
#include "TaskFemConstraintTemperature.h"
|
||||
#include "ui_TaskFemConstraintTemperature.h"
|
||||
@@ -359,21 +360,6 @@ TaskDlgFemConstraintTemperature::TaskDlgFemConstraintTemperature(
|
||||
|
||||
//==== calls from the TaskView ===============================================================
|
||||
|
||||
void TaskDlgFemConstraintTemperature::open()
|
||||
{
|
||||
// a transaction is already open at creation time of the panel
|
||||
if (!Gui::Command::hasPendingCommand()) {
|
||||
QString msg = QObject::tr("Temperature boundary condition");
|
||||
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 TaskDlgFemConstraintTemperature::accept()
|
||||
{
|
||||
std::string name = ConstraintView->getObject()->getNameInDocument();
|
||||
@@ -408,13 +394,4 @@ bool TaskDlgFemConstraintTemperature::accept()
|
||||
return TaskDlgFemConstraint::accept();
|
||||
}
|
||||
|
||||
bool TaskDlgFemConstraintTemperature::reject()
|
||||
{
|
||||
Gui::Command::abortCommand();
|
||||
Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeDocument().resetEdit()");
|
||||
Gui::Command::updateActive();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#include "moc_TaskFemConstraintTemperature.cpp"
|
||||
|
||||
Reference in New Issue
Block a user