Fix apply() method not called consistently
The python console commands where not consistenly reported because the apply function was not called or not implemented. The function is now called from the base class and also when a subfeature is closed in MultiTransform. Some missing properties are also added.
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#endif
|
||||
|
||||
#include <App/DocumentObject.h>
|
||||
#include <App/Document.h>
|
||||
#include <Base/Console.h>
|
||||
#include <Gui/Command.h>
|
||||
#include <Gui/Selection.h>
|
||||
@@ -141,11 +142,9 @@ unsigned TaskScaledParameters::getOccurrences() const
|
||||
return ui->spinOccurrences->value();
|
||||
}
|
||||
|
||||
void TaskScaledParameters::apply()
|
||||
void TaskScaledParameters::doApply()
|
||||
{
|
||||
std::string name = TransformedView->getObject()->getNameInDocument();
|
||||
|
||||
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Factor = %f",name.c_str(), getFactor());
|
||||
FCMD_OBJ_CMD(getObject(),"Factor = " << getFactor());
|
||||
ui->spinOccurrences->apply();
|
||||
}
|
||||
|
||||
@@ -161,14 +160,5 @@ TaskDlgScaledParameters::TaskDlgScaledParameters(ViewProviderScaled *ScaledView)
|
||||
|
||||
Content.push_back(parameter);
|
||||
}
|
||||
//==== calls from the TaskView ===============================================================
|
||||
|
||||
bool TaskDlgScaledParameters::accept()
|
||||
{
|
||||
|
||||
parameter->apply();
|
||||
|
||||
return TaskDlgTransformedParameters::accept();
|
||||
}
|
||||
|
||||
#include "moc_TaskScaledParameters.cpp"
|
||||
|
||||
Reference in New Issue
Block a user