Bug fixes for Body feature insert/remove functionality
This commit is contained in:
committed by
Stefan Tröger
parent
3e4986f163
commit
ee47c53339
@@ -41,7 +41,8 @@
|
||||
#include <Gui/Command.h>
|
||||
#include <Mod/PartDesign/App/FeatureGroove.h>
|
||||
#include <Mod/Sketcher/App/SketchObject.h>
|
||||
|
||||
#include <Mod/PartDesign/App/Body.h>
|
||||
#include "Workbench.h"
|
||||
|
||||
using namespace PartDesignGui;
|
||||
using namespace Gui;
|
||||
@@ -336,6 +337,19 @@ bool TaskDlgGrooveParameters::reject()
|
||||
pcSupport = pcSketch->Support.getValue();
|
||||
}
|
||||
|
||||
// Body housekeeping
|
||||
if (ActivePartObject != NULL) {
|
||||
ActivePartObject->removeFeature(pcGroove);
|
||||
// Make the new Tip and the previous solid feature visible again
|
||||
App::DocumentObject* tip = ActivePartObject->Tip.getValue();
|
||||
App::DocumentObject* prev = ActivePartObject->getPrevSolidFeature();
|
||||
if (tip != NULL) {
|
||||
Gui::Application::Instance->getViewProvider(tip)->show();
|
||||
if ((tip != prev) && (prev != NULL))
|
||||
Gui::Application::Instance->getViewProvider(prev)->show();
|
||||
}
|
||||
}
|
||||
|
||||
// role back the done things
|
||||
Gui::Command::abortCommand();
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeDocument().resetEdit()");
|
||||
|
||||
Reference in New Issue
Block a user