Skip to content

Commit

Permalink
Sketcher: fix unnecessary filtering objects for TempoVis
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DeepSOIC authored and yorikvanhavre committed Sep 4, 2019
1 parent 0c5eb55 commit 3a48cad
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Mod/Sketcher/Gui/ViewProviderSketch.cpp
Expand Up @@ -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"
Expand Down

0 comments on commit 3a48cad

Please sign in to comment.