PartDesign/Gui: make Transformed ViewProviders use common code with other
This commit is contained in:
committed by
Stefan Tröger
parent
9cba6c48ea
commit
1b1bd5f17e
@@ -28,39 +28,11 @@
|
||||
|
||||
#include "ViewProviderPolarPattern.h"
|
||||
#include "TaskPolarPatternParameters.h"
|
||||
#include <Mod/PartDesign/App/FeaturePolarPattern.h>
|
||||
#include <Mod/Sketcher/App/SketchObject.h>
|
||||
#include <Gui/Control.h>
|
||||
#include <Gui/Command.h>
|
||||
#include <Gui/Application.h>
|
||||
|
||||
using namespace PartDesignGui;
|
||||
|
||||
PROPERTY_SOURCE(PartDesignGui::ViewProviderPolarPattern,PartDesignGui::ViewProviderTransformed)
|
||||
|
||||
bool ViewProviderPolarPattern::setEdit(int ModNum)
|
||||
{
|
||||
ViewProviderTransformed::setEdit(ModNum);
|
||||
|
||||
if (ModNum == ViewProvider::Default ) {
|
||||
TaskDlgPolarPatternParameters *polarpatternDlg = NULL;
|
||||
|
||||
if (checkDlgOpen(polarpatternDlg)) {
|
||||
// always change to PartDesign WB, remember where we come from
|
||||
oldWb = Gui::Command::assureWorkbench("PartDesignWorkbench");
|
||||
|
||||
// start the edit dialog
|
||||
if (polarpatternDlg)
|
||||
Gui::Control().showDialog(polarpatternDlg);
|
||||
else
|
||||
Gui::Control().showDialog(new TaskDlgPolarPatternParameters(this));
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
return ViewProviderPart::setEdit(ModNum);
|
||||
}
|
||||
TaskDlgFeatureParameters *ViewProviderPolarPattern::getEditDialog() {
|
||||
return new TaskDlgPolarPatternParameters (this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user