PartDesign: Unify deletion behavior
This unifies deletion behavior for all PartDesign features ensuring that sketches that were used to create these features show after deletion and that the tip is properly transfered.
This commit is contained in:
committed by
Chris Hennes
parent
be3b9edd33
commit
cf951bae6b
@@ -63,23 +63,6 @@ void ViewProviderHole::setupContextMenu(QMenu* menu, QObject* receiver, const ch
|
||||
PartDesignGui::ViewProvider::setupContextMenu(menu, receiver, member);
|
||||
}
|
||||
|
||||
bool ViewProviderHole::onDelete(const std::vector<std::string>& s)
|
||||
{
|
||||
// get the Sketch
|
||||
PartDesign::Hole* pcHole = getObject<PartDesign::Hole>();
|
||||
Sketcher::SketchObject* pcSketch = nullptr;
|
||||
if (pcHole->Profile.getValue()) {
|
||||
pcSketch = static_cast<Sketcher::SketchObject*>(pcHole->Profile.getValue());
|
||||
}
|
||||
|
||||
// if abort command deleted the object the sketch is visible again
|
||||
if (pcSketch && Gui::Application::Instance->getViewProvider(pcSketch)) {
|
||||
Gui::Application::Instance->getViewProvider(pcSketch)->show();
|
||||
}
|
||||
|
||||
return ViewProvider::onDelete(s);
|
||||
}
|
||||
|
||||
TaskDlgFeatureParameters* ViewProviderHole::getEditDialog()
|
||||
{
|
||||
return new TaskDlgHoleParameters(this);
|
||||
|
||||
Reference in New Issue
Block a user