[fixed] leader line disappears when reopening document
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
[fixed] leader line disappears when reopening document
I think there is a bug:
When creating a leader line, it is visible and shows the red color I want.
So this is what I designed:
Then I close the document and reopen it:
What I get is this:
So the positions of the projections are wrong and also the leader line is no longer visible.
When creating a leader line, it is visible and shows the red color I want.
So this is what I designed:
Then I close the document and reopen it:
What I get is this:
So the positions of the projections are wrong and also the leader line is no longer visible.
Last edited by uwestoehr on Tue Jan 14, 2020 1:56 pm, edited 1 time in total.
- wandererfan
- Veteran
- Posts: 6265
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: leader line disappears when reopening document
The second image looks like the views have been autodistributed. Is Autodistribute on for the ProjectionGroup?
I know about the leader line issue. You have to click it in the tree, then it appears. I've looked for the bug a few times, but no success yet. Probably staring right at it without seeing it.
Re: leader line disappears when reopening document
Stupid me. It was on by default. I am not sure if it should be on by default. if the ISO norms recommend or even request this then of course it should be on. I don't know the content of the norms, so maybe my drawing is not norm-conform?wandererfan wrote: ↑Wed Jan 08, 2020 4:05 pm The second image looks like the views have been autodistributed. Is Autodistribute on for the ProjectionGroup?
OK.wandererfan wrote: ↑Wed Jan 08, 2020 4:05 pm I know about the leader line issue. You have to click it in the tree, then it appears. I've looked for the bug a few times, but no success yet.
A minor issue: in the tree view the auto-label is "DrawLeaderLine" shouldn't it just be "LeaderLine"?
- wandererfan
- Veteran
- Posts: 6265
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: leader line disappears when reopening document
As far as I know the First/Third angle conventions only address the arrangement of the orthogonal views. So a case could be made that the iso views shouldn't be autodistributed ever.
Probably. All those "Draw" prefixes are a legacy of when TechDraw was Drawing v2.0.A minor issue: in the tree view the auto-label is "DrawLeaderLine" shouldn't it just be "LeaderLine"?
Re: leader line disappears when reopening document
OK, so autodistribute could also be turned off by default. I vote for this since in Solidworks this is also off by default and I stumble over this regularily.wandererfan wrote: ↑Thu Jan 09, 2020 12:48 am As far as I know the First/Third angle conventions only address the arrangement of the orthogonal views. So a case could be made that the iso views shouldn't be autodistributed ever.
So we can get rid of them. I'll have a look the next days.wandererfan wrote: ↑Thu Jan 09, 2020 12:48 am Probably. All those "Draw" prefixes are a legacy of when TechDraw was Drawing v2.0.
- wandererfan
- Veteran
- Posts: 6265
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: leader line disappears when reopening document
Thanks. I did not yet notice this.wandererfan wrote: ↑Thu Jan 09, 2020 1:50 pm Default for autodistribute can be changed in Preferences in "General" category.
Re: leader line disappears when reopening document
Don't know if this is of any help for you. When loading the project file then relevant function calls are:wandererfan wrote: ↑Wed Jan 08, 2020 4:05 pm I know about the leader line issue. You have to click it in the tree, then it appears. I've looked for the bug a few times, but no success yet. Probably staring right at it without seeing it.
- MDIViewPage::attachView
- QGVPage::addViewLeader
- QGILeaderLine::updateView
- QGILeaderLine::draw
- QGIView::getGraphicsView
- ViewProviderDrawingView::getMDIViewPage
- ViewProviderPage::getMDIViewPage
If I disable this check (because it nowhere uses the "view" pointer) the leader line is at least shown in the MDI view, however at the wrong position. When selecting it then it jumps to the correct position.
The attachView function is called inside the constructor of MDIViewPage, i.e. before its assigned to the m_mdiView member of the ViewProviderPage. Maybe you should split the constructor into two parts:
leave the pure construction stuff in the constructor and move adding all items to a second function which you call from within ViewProviderPage::showMDIViewPage after the MDIViewPage is assigned to the m_mdiView.
- wandererfan
- Veteran
- Posts: 6265
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
- wandererfan
- Veteran
- Posts: 6265
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: leader line disappears when reopening document
Thanks to @wmayer's hints, this should be fixed by git commit 00c69a9c64.