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 "ViewProviderLinearPattern.h"
|
||||
#include "TaskLinearPatternParameters.h"
|
||||
#include <Mod/PartDesign/App/FeatureLinearPattern.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::ViewProviderLinearPattern,PartDesignGui::ViewProviderTransformed)
|
||||
|
||||
bool ViewProviderLinearPattern::setEdit(int ModNum)
|
||||
{
|
||||
ViewProviderTransformed::setEdit(ModNum);
|
||||
|
||||
if (ModNum == ViewProvider::Default ) {
|
||||
TaskDlgLinearPatternParameters *linearpatternDlg = NULL;
|
||||
|
||||
if (checkDlgOpen(linearpatternDlg)) {
|
||||
// always change to PartDesign WB, remember where we come from
|
||||
oldWb = Gui::Command::assureWorkbench("PartDesignWorkbench");
|
||||
|
||||
// start the edit dialog
|
||||
if (linearpatternDlg)
|
||||
Gui::Control().showDialog(linearpatternDlg);
|
||||
else
|
||||
Gui::Control().showDialog(new TaskDlgLinearPatternParameters(this));
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
return ViewProviderPart::setEdit(ModNum);
|
||||
}
|
||||
TaskDlgFeatureParameters *ViewProviderLinearPattern::getEditDialog() {
|
||||
return new TaskDlgLinearPatternParameters (this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user