More work on highlighting and hiding/showing
This commit is contained in:
committed by
Stefan Tröger
parent
1ec99c5d32
commit
e184c9f229
@@ -132,24 +132,19 @@ void ViewProviderRevolution::unsetEdit(int ModNum)
|
||||
}
|
||||
}
|
||||
|
||||
bool ViewProviderRevolution::onDelete(const std::vector<std::string> &)
|
||||
bool ViewProviderRevolution::onDelete(const std::vector<std::string> &s)
|
||||
{
|
||||
// get the support and Sketch
|
||||
// get the Sketch
|
||||
PartDesign::Revolution* pcRevolution = static_cast<PartDesign::Revolution*>(getObject());
|
||||
Sketcher::SketchObject *pcSketch = 0;
|
||||
App::DocumentObject *pcSupport = 0;
|
||||
if (pcRevolution->Sketch.getValue()){
|
||||
pcSketch = static_cast<Sketcher::SketchObject*>(pcRevolution->Sketch.getValue());
|
||||
pcSupport = pcSketch->Support.getValue();
|
||||
}
|
||||
if (pcRevolution->Sketch.getValue())
|
||||
pcSketch = static_cast<Sketcher::SketchObject*>(pcRevolution->Sketch.getValue());
|
||||
|
||||
// if abort command deleted the object the support is visible again
|
||||
// if abort command deleted the object the Sketch is visible again
|
||||
if (pcSketch && Gui::Application::Instance->getViewProvider(pcSketch))
|
||||
Gui::Application::Instance->getViewProvider(pcSketch)->show();
|
||||
if (pcSupport && Gui::Application::Instance->getViewProvider(pcSupport))
|
||||
Gui::Application::Instance->getViewProvider(pcSupport)->show();
|
||||
|
||||
return true;
|
||||
return ViewProvider::onDelete(s);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user