Fix transform feature crash on apply
-Redundant "reset edit" and command commit removed -Redundant apply call removed
This commit is contained in:
parent
16433939e1
commit
99ef8e756d
|
@ -82,6 +82,9 @@ bool TaskDlgFeatureParameters::accept() {
|
|||
// Iterate over parameter dialogs and apply all parameters from them
|
||||
for ( QWidget *wgt : Content ) {
|
||||
TaskFeatureParameters *param = qobject_cast<TaskFeatureParameters *> (wgt);
|
||||
if(!param)
|
||||
continue;
|
||||
|
||||
param->saveHistory ();
|
||||
param->apply ();
|
||||
}
|
||||
|
|
|
@ -396,12 +396,6 @@ void TaskLinearPatternParameters::apply()
|
|||
|
||||
ui->spinLength->apply();
|
||||
ui->spinOccurrences->apply();
|
||||
|
||||
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.recompute()");
|
||||
if (!TransformedView->getObject()->isValid())
|
||||
throw Base::Exception(TransformedView->getObject()->getStatusString());
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeDocument().resetEdit()");
|
||||
Gui::Command::commitCommand();
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
|
@ -417,14 +411,4 @@ TaskDlgLinearPatternParameters::TaskDlgLinearPatternParameters(ViewProviderLinea
|
|||
Content.push_back(parameter);
|
||||
}
|
||||
|
||||
//==== calls from the TaskView ===============================================================
|
||||
|
||||
bool TaskDlgLinearPatternParameters::accept()
|
||||
{
|
||||
|
||||
parameter->apply();
|
||||
|
||||
return TaskDlgTransformedParameters::accept();
|
||||
}
|
||||
|
||||
#include "moc_TaskLinearPatternParameters.cpp"
|
||||
|
|
|
@ -98,10 +98,6 @@ class TaskDlgLinearPatternParameters : public TaskDlgTransformedParameters
|
|||
public:
|
||||
TaskDlgLinearPatternParameters(ViewProviderLinearPattern *LinearPatternView);
|
||||
virtual ~TaskDlgLinearPatternParameters() {}
|
||||
|
||||
public:
|
||||
/// is called by the framework if the dialog is accepted (Ok)
|
||||
virtual bool accept();
|
||||
};
|
||||
|
||||
} //namespace PartDesignGui
|
||||
|
|
|
@ -391,11 +391,6 @@ void TaskPolarPatternParameters::apply()
|
|||
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Reversed = %u",name.c_str(),getReverse());
|
||||
ui->polarAngle->apply();
|
||||
ui->spinOccurrences->apply();
|
||||
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.recompute()");
|
||||
if (!TransformedView->getObject()->isValid())
|
||||
throw Base::Exception(TransformedView->getObject()->getStatusString());
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeDocument().resetEdit()");
|
||||
Gui::Command::commitCommand();
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
|
@ -410,14 +405,5 @@ TaskDlgPolarPatternParameters::TaskDlgPolarPatternParameters(ViewProviderPolarPa
|
|||
|
||||
Content.push_back(parameter);
|
||||
}
|
||||
//==== calls from the TaskView ===============================================================
|
||||
|
||||
bool TaskDlgPolarPatternParameters::accept()
|
||||
{
|
||||
|
||||
parameter->apply();
|
||||
|
||||
return TaskDlgTransformedParameters::accept();
|
||||
}
|
||||
|
||||
#include "moc_TaskPolarPatternParameters.cpp"
|
||||
|
|
|
@ -99,10 +99,6 @@ class TaskDlgPolarPatternParameters : public TaskDlgTransformedParameters
|
|||
public:
|
||||
TaskDlgPolarPatternParameters(ViewProviderPolarPattern *PolarPatternView);
|
||||
virtual ~TaskDlgPolarPatternParameters() {}
|
||||
|
||||
public:
|
||||
/// is called by the framework if the dialog is accepted (Ok)
|
||||
virtual bool accept();
|
||||
};
|
||||
|
||||
} //namespace PartDesignGui
|
||||
|
|
|
@ -233,11 +233,6 @@ void TaskScaledParameters::apply()
|
|||
|
||||
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Factor = %f",name.c_str(), getFactor());
|
||||
ui->spinOccurrences->apply();
|
||||
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.recompute()");
|
||||
if (!TransformedView->getObject()->isValid())
|
||||
throw Base::Exception(TransformedView->getObject()->getStatusString());
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeDocument().resetEdit()");
|
||||
Gui::Command::commitCommand();
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
|
|
Loading…
Reference in New Issue
Block a user