Sketcher: fix unnecessary filtering objects for TempoVis

TempoVis now should take care of it.

This was originally done to stop Drawing and TechDraw views pop up when closing a sketch the drawing depends on.
Now, TempoVis show_xxx and hide_xxx methods should auto filter out objects that are not in 3d view.
This commit is contained in:
DeepSOIC
2019-09-02 22:44:06 +03:00
committed by Yorik van Havre
parent c9575447c0
commit 2b4182e281

View File

@@ -5669,13 +5669,11 @@ bool ViewProviderSketch::setEdit(int ModNum)
QString cmdstr = QString::fromLatin1(
"ActiveSketch = App.getDocument('%1').getObject('%2')\n"
"tv = Show.TempoVis(App.ActiveDocument, tag= ActiveSketch.ViewObject.TypeId)\n"
"ActiveSketch.ViewObject.TempoVis = tv\n"
"if ActiveSketch.ViewObject.EditingWorkbench:\n"
" tv.activateWorkbench(ActiveSketch.ViewObject.EditingWorkbench)\n"
"if ActiveSketch.ViewObject.HideDependent:\n"
" objs = tv.get_all_dependent(%3, '%4')\n"
" objs = filter(lambda x: not x.TypeId.startswith(\"TechDraw::\"), objs)\n"
" objs = filter(lambda x: not x.TypeId.startswith(\"Drawing::\"), objs)\n"
" tv.hide(objs)\n"
" tv.hide(tv.get_all_dependent(%3, '%4'))\n"
"if ActiveSketch.ViewObject.ShowSupport:\n"
" tv.show([ref[0] for ref in ActiveSketch.Support if not ref[0].isDerivedFrom(\"PartDesign::Plane\")])\n"
"if ActiveSketch.ViewObject.ShowLinks:\n"