I stumbled recently over a Gui-problem where clicking at a sketch FreeCAD changed the internal windows from full to all view. This is annoying. It seems to be related to having a TechDraw-page in the document.
Is this the same behavior at other systems?
It can be tested with the attached file: just double-click on the sketch in the tree-view.
Ulrich
OS: Debian GNU/Linux 8.8 (jessie)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11225 (Git)
Build type: Release
Branch: Rueck6
Hash: 9ca0f91d6b36953efd9340864abb4bc960d58955
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.1.0
edit: The problem shows also up in a windows-version under wine.
OS: Windows XP
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.17.11129 (Git)
Build type: Release
Branch: master
Hash: b604b27ad3bbbacfede88e32390b076ef108331f
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
Gui Problem Sketcher and TechDraw
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
Gui Problem Sketcher and TechDraw
- Attachments
-
- Gui_problem.png (350.4 KiB) Viewed 1408 times
-
- Gui_problem.fcstd
- File for test
- (25.48 KiB) Downloaded 32 times
- Boneshaker
- Posts: 69
- Joined: Sat Feb 20, 2016 2:20 pm
- Location: Emden, Germany
Re: Gui Problem Sketcher and TechDraw
Hi,
same behaviour here.
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11223 (Git)
Build type: Release
Branch: master
Hash: 88bd341ad2da7399719d350bf9f715297d8d9f33
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
same behaviour here.
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11223 (Git)
Build type: Release
Branch: master
Hash: 88bd341ad2da7399719d350bf9f715297d8d9f33
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Monthly FreeCAD Challenge: https://forum.freecadweb.org/viewtopic.php?f=24&t=36615
Re: Gui Problem Sketcher and TechDraw
Same here:
OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11224 (Git)
Build type: None
Branch: master
Hash: d52f9f5d1a0c38a1a1b669fe694175cbd07d8d06
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
BR,
HoWil
OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11224 (Git)
Build type: None
Branch: master
Hash: d52f9f5d1a0c38a1a1b669fe694175cbd07d8d06
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
BR,
HoWil
Re: Gui Problem Sketcher and TechDraw
This behaviour is caused in the preferences by the Sketcher option Hide all objects that depend on the sketch
If this option is active the Python method Show.TempoVis.hide_all_dependent inside ViewProviderSketch::setEdit is called which hides all objects that depend on the sketch object. This includes the Page object.
Now when hiding the Page object its view provider explicitly activates the previous view (the 3d view) which at this point is not maximized and removes the Drawing viewer from the MDI list. That's why afterwards the 3d view is still not maximized.
To partially fix the problem the line to activate the previous view can be removed because Qt's MDI handling does this automatically. When doing so the 3d window is shown normally when editing the sketch.
However, when leaving the edit mode the Page object becomes visible again and activates its Drawing view which will become the active view, then.
Actually there is no need to hide or show any TechDraw items when editing a sketch because they are rendered in a different window and thus don't hide the sketch in a way.
If this option is active the Python method Show.TempoVis.hide_all_dependent inside ViewProviderSketch::setEdit is called which hides all objects that depend on the sketch object. This includes the Page object.
Now when hiding the Page object its view provider explicitly activates the previous view (the 3d view) which at this point is not maximized and removes the Drawing viewer from the MDI list. That's why afterwards the 3d view is still not maximized.
To partially fix the problem the line to activate the previous view can be removed because Qt's MDI handling does this automatically. When doing so the 3d window is shown normally when editing the sketch.
However, when leaving the edit mode the Page object becomes visible again and activates its Drawing view which will become the active view, then.
Actually there is no need to hide or show any TechDraw items when editing a sketch because they are rendered in a different window and thus don't hide the sketch in a way.
Re: Gui Problem Sketcher and TechDraw
git commit 1d83d17 fixes the problem.
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: Gui Problem Sketcher and TechDraw
I wonder, how to fix it properly.
First, I didn't quite understand, why was the filtering-out of techdraw objects done in sketcher code, rather than in tempovis code. HideAllDependent is also used by attachment editor, so similar problem is to be expected there.
Second, for a proper fix, TempoVis should probably check, if the object it is dealing with is actually in 3d view or not. I wonder how to do it. Maybe it can be done by checking for the lack of coin subgraph? Or by lack of display modes...
First, I didn't quite understand, why was the filtering-out of techdraw objects done in sketcher code, rather than in tempovis code. HideAllDependent is also used by attachment editor, so similar problem is to be expected there.
Second, for a proper fix, TempoVis should probably check, if the object it is dealing with is actually in 3d view or not. I wonder how to do it. Maybe it can be done by checking for the lack of coin subgraph? Or by lack of display modes...
Re: Gui Problem Sketcher and TechDraw
Maybe this:
Code: Select all
Gui.ActiveDocument.ActiveView