More work on highlighting and hiding/showing

This commit is contained in:
jrheinlaender
2013-04-10 17:42:46 +04:30
committed by Stefan Tröger
parent 8390bbb999
commit 0701b237ac
6 changed files with 75 additions and 45 deletions

View File

@@ -132,24 +132,19 @@ void ViewProviderGroove::unsetEdit(int ModNum)
}
}
bool ViewProviderGroove::onDelete(const std::vector<std::string> &)
bool ViewProviderGroove::onDelete(const std::vector<std::string> &s)
{
// get the support and Sketch
// get the Sketch
PartDesign::Groove* pcGroove = static_cast<PartDesign::Groove*>(getObject());
Sketcher::SketchObject *pcSketch = 0;
App::DocumentObject *pcSupport = 0;
if (pcGroove->Sketch.getValue()){
if (pcGroove->Sketch.getValue())
pcSketch = static_cast<Sketcher::SketchObject*>(pcGroove->Sketch.getValue());
pcSupport = pcSketch->Support.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);
}