Fix #10 View Visibility
This commit is contained in:
@@ -91,36 +91,31 @@ std::vector<App::DocumentObject*> ViewProviderViewClip::claimChildren(void) cons
|
||||
|
||||
void ViewProviderViewClip::show(void)
|
||||
{
|
||||
ViewProviderDrawingView::show();
|
||||
|
||||
//TODO: not sure that clip members need to be touched when hiding clip group
|
||||
App::DocumentObject* obj = getObject();
|
||||
if (!obj || obj->isRestoring())
|
||||
return;
|
||||
if (obj->getTypeId().isDerivedFrom(TechDraw::DrawViewClip::getClassTypeId())) {
|
||||
// The 'Visible' property is marked as 'Output'. To update the drawing on recompute
|
||||
// the parent page object is touched.
|
||||
static_cast<TechDraw::DrawViewClip*>(obj)->Visible.setValue(true);
|
||||
std::vector<App::DocumentObject*> inp = obj->getInList();
|
||||
for (std::vector<App::DocumentObject*>::iterator it = inp.begin(); it != inp.end(); ++it)
|
||||
(*it)->touch();
|
||||
}
|
||||
ViewProviderDrawingView::show();
|
||||
|
||||
}
|
||||
|
||||
void ViewProviderViewClip::hide(void)
|
||||
{
|
||||
ViewProviderDrawingView::hide();
|
||||
|
||||
//TODO: not sure that clip members need to be touched when hiding clip group
|
||||
App::DocumentObject* obj = getObject();
|
||||
if (!obj || obj->isRestoring())
|
||||
return;
|
||||
if (obj->getTypeId().isDerivedFrom(TechDraw::DrawViewClip::getClassTypeId())) {
|
||||
// The 'Visible' property is marked as 'Output'. To update the drawing on recompute
|
||||
// the parent page object is touched.
|
||||
static_cast<TechDraw::DrawViewClip*>(obj)->Visible.setValue(false);
|
||||
std::vector<App::DocumentObject*> inp = obj->getInList();
|
||||
for (std::vector<App::DocumentObject*>::iterator it = inp.begin(); it != inp.end(); ++it)
|
||||
(*it)->touch();
|
||||
}
|
||||
ViewProviderDrawingView::hide();
|
||||
}
|
||||
|
||||
bool ViewProviderViewClip::isShow(void) const
|
||||
@@ -128,20 +123,6 @@ bool ViewProviderViewClip::isShow(void) const
|
||||
return Visibility.getValue();
|
||||
}
|
||||
|
||||
void ViewProviderViewClip::startRestoring()
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
void ViewProviderViewClip::finishRestoring()
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
void ViewProviderViewClip::updateData(const App::Property*)
|
||||
{
|
||||
}
|
||||
|
||||
TechDraw::DrawViewClip* ViewProviderViewClip::getObject() const
|
||||
{
|
||||
return dynamic_cast<TechDraw::DrawViewClip*>(pcObject);
|
||||
|
||||
Reference in New Issue
Block a user