ProjGroup Views get misaligned by saving

Discussions about the development of the TechDraw workbench
User avatar
uwestoehr
Posts: 1794
Joined: Sun Jan 27, 2019 3:21 am

ProjGroup Views get misaligned by saving

Postby uwestoehr » Mon Dec 09, 2019 6:30 pm

- open the this simple test file:
TD-test.FCStd
test file
(128.39 KiB) Downloaded 9 times
- arrange the views of the ProjGroup until it looks more or less like this:
FreeCAD_QxGwLSuB6b.png
FreeCAD_QxGwLSuB6b.png (39.11 KiB) Viewed 245 times
- save the document, close it and reopen it

result: the views are misaligned. They appear on different positions than where they were when the document was saved.
User avatar
wandererfan
Posts: 4078
Joined: Tue Nov 06, 2012 5:42 pm

Re: ProjGroup Views get misaligned by saving

Postby wandererfan » Mon Dec 09, 2019 10:57 pm

uwestoehr wrote:
Mon Dec 09, 2019 6:30 pm
result: the views are misaligned. They appear on different positions than where they were when the document was saved.
Auto Distribute is set to true. "DATA AutoDistribute: If true, space out individual views automatically. Use false to position manually."

TD-test_DPG_AutoDistrib.png
TD-test_DPG_AutoDistrib.png (54.29 KiB) Viewed 233 times
User avatar
uwestoehr
Posts: 1794
Joined: Sun Jan 27, 2019 3:21 am

Re: ProjGroup Views get misaligned by saving

Postby uwestoehr » Mon Dec 09, 2019 11:10 pm

wandererfan wrote:
Mon Dec 09, 2019 10:57 pm
Auto Distribute is set to true. "DATA AutoDistribute: If true, space out individual views automatically. Use false to position manually."
Hmm, but this is nothing one expects as user. I kept it on true because when creating a ProjGroup, this is useful. However, when I explicitly move around, save and close, I expect the file to be unchanged after opening. I mean there is no feedback that the file is not actually saved as the user sees it.
Therefore I propose AutoDistribute is not triggered on saving/opening.
User avatar
uwestoehr
Posts: 1794
Joined: Sun Jan 27, 2019 3:21 am

Re: ProjGroup Views get misaligned by saving

Postby uwestoehr » Mon Dec 09, 2019 11:33 pm

Only for reference: I noticed the spacing has no unit, so I added it in this PR: https://github.com/FreeCAD/FreeCAD/pull/2768
chrisb
Posts: 28029
Joined: Tue Mar 17, 2015 9:14 am

Re: ProjGroup Views get misaligned by saving

Postby chrisb » Tue Dec 10, 2019 12:28 am

I think it should always be permitted that opening a file performs a partial or total recompute. So it's the recompute which you miss.
User avatar
uwestoehr
Posts: 1794
Joined: Sun Jan 27, 2019 3:21 am

Re: ProjGroup Views get misaligned by saving

Postby uwestoehr » Tue Dec 10, 2019 12:32 am

chrisb wrote:
Tue Dec 10, 2019 12:28 am
I think it should always be permitted that opening a file performs a partial or total recompute. So it's the recompute which you miss.
Yes. I miss that the recomputation is done before the file is saved. So when I click save, I need to see the change. Then I know in what state the file was actually saved and are not surprized when I open the file again.