Fem: Use base class open and reject methods in constraint task panels
This commit is contained in:
@@ -520,21 +520,6 @@ TaskDlgFemConstraintContact::TaskDlgFemConstraintContact(
|
||||
|
||||
//==== calls from the TaskView ===============================================================
|
||||
|
||||
void TaskDlgFemConstraintContact::open()
|
||||
{
|
||||
// a transaction is already open at creation time of the panel
|
||||
if (!Gui::Command::hasPendingCommand()) {
|
||||
QString msg = QObject::tr("Contact constraint");
|
||||
Gui::Command::openCommand(static_cast<const char*>(msg.toUtf8()));
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
bool TaskDlgFemConstraintContact::accept()
|
||||
{
|
||||
/* Note: */
|
||||
@@ -572,12 +557,4 @@ bool TaskDlgFemConstraintContact::accept()
|
||||
return TaskDlgFemConstraint::accept();
|
||||
}
|
||||
|
||||
bool TaskDlgFemConstraintContact::reject()
|
||||
{
|
||||
Gui::Command::abortCommand();
|
||||
Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeDocument().resetEdit()");
|
||||
Gui::Command::updateActive();
|
||||
|
||||
return true;
|
||||
}
|
||||
#include "moc_TaskFemConstraintContact.cpp"
|
||||
|
||||
Reference in New Issue
Block a user