App::Link: Toggling visibility touches containing Part

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
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!
User avatar
DeepSOIC
Posts: 6969
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

App::Link: Toggling visibility touches containing Part

Postby DeepSOIC » Fri Aug 23, 2019 2:08 pm

1. Open attached file
2. In Part, toggle visibility of Cube
-> Part is touched as a result. Also, the project is marked as changed.

Is it by design? If so, why? I wouldn't like to recompute after just toggling some objects on and off. Marking the project as changed isn't a big deal, but I don't like that either.

(I assume it's because of the Link merge)
realthunder wrote:Ding!
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17803 (Git)
Build type: Release
Branch: master
Hash: 89961a33d46063a43e9fb5b0308ca95d559eca94
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Russian/Russia (ru_RU)
Attachments
box-in-Part.FCStd
(5.1 KiB) Downloaded 4 times
User avatar
furti
Posts: 321
Joined: Mon Nov 27, 2017 5:27 pm

Re: App::Link: Toggling visibility touches containing Part

Postby furti » Fri Aug 23, 2019 2:25 pm

I have seen this also with Arch Buildings and Building Parts.

1. Create a new Document
2. Add a Building Part
3. Add A Building
4. Drag the Building Part into the Building
5. Toggle the visibility of the Building Part

Now the Building gets marked to recompute. But I'm not sure if this is because of changes in the Arch Workbench or because of the App::Link functionality.
wmayer
Site Admin
Posts: 14798
Joined: Thu Feb 19, 2009 10:32 am

Re: App::Link: Toggling visibility touches containing Part

Postby wmayer » Fri Aug 23, 2019 3:36 pm

Marking the project as changed isn't a big deal, but I don't like that either.
This behaviour has changed recently. There was a bug report in Mantis that the document should also be touched when changing any GUI stuff of the document such as colour, visibility, ... If needed we could add an option to disable touching the document for GUI objects.
So, this has nothing to do with the Link3 branch.
User avatar
DeepSOIC
Posts: 6969
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: App::Link: Toggling visibility touches containing Part

Postby DeepSOIC » Fri Aug 23, 2019 4:00 pm

wmayer wrote:
Fri Aug 23, 2019 3:36 pm
This behaviour has changed recently. ... this has nothing to do with the Link3 branch.
OK, thanks. And what do you think of the first part, Part getting touched?

BTW, the reason I don't want GUI stuff be interpreted as a change is somewhat personal and weird... so don't bother, unless you have nothing else to do (I totally know that's never the case).

You know, I sometimes open some project for looking up something. Then, I switch to something else and else and so on... and a week or so later, when I decide to close everything, FreeCAD (or can be Excel or whatever) pops me up with "save changes?" prompt. I find myself wondering, what did I change in that project, was it important, and I struggle. Usually, I check the undo stack to help me recall what it was. So I just don't want to have an unnecessary prompt. But since undo stack will be empty in this case, it won't be a big head-scratcher anyway.
vocx
Posts: 1443
Joined: Thu Oct 18, 2018 9:18 pm

Re: App::Link: Toggling visibility touches containing Part

Postby vocx » Fri Aug 23, 2019 4:45 pm

DeepSOIC wrote:
Fri Aug 23, 2019 4:00 pm
...

BTW, the reason I don't want GUI stuff be interpreted as a change is somewhat personal and weird...
...
I can't find the thread but this was requested a couple of months ago. A user had modified the graphical appearance of his objects, but then closed FreeCAD, and FreeCAD didn't save the modifications, so all his changes were lost. So, it seemed the graphical changes weren't interpreted as touching the document. When you think about it, it would also make you angry if you spent some time changing your document and then closing FreeCAD (intentionally or unintentionally) and your changes not being saved at all.
User avatar
DeepSOIC
Posts: 6969
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: App::Link: Toggling visibility touches containing Part

Postby DeepSOIC » Fri Aug 23, 2019 5:03 pm

As for visibility touching stuff, I found this in RT's wiki:
https://github.com/realthunder/FreeCAD_ ... mentobject
DocumentObject
A new property, Visibility, has been added to make it possible to set and get visibility status of an object in App namespace. This makes it possible to determine the children visibilities in some group object without loading GUI, for example, to generate a compound shape representation of a group.
That doesn't quite answer the question. But it's close.
kisolre
Posts: 1359
Joined: Wed Nov 21, 2018 1:13 pm

Re: App::Link: Toggling visibility touches containing Part

Postby kisolre » Fri Aug 23, 2019 5:04 pm

It was me and it was annoyng and inconsistent - you change something, it gets saved but you are not warned for the change.
Anyway changing visibility should not touch the element for recompute. Unless visibility properties can be referenced through expressions and are referenced.
TheMarkster
Posts: 1060
Joined: Thu Apr 05, 2018 1:53 am

Re: App::Link: Toggling visibility touches containing Part

Postby TheMarkster » Fri Aug 23, 2019 5:18 pm

kisolre wrote:
Fri Aug 23, 2019 5:04 pm
It was me and it was annoyng and inconsistent - you change something, it gets saved but you are not warned for the change.
Anyway changing visibility should not touch the element for recompute. Unless visibility properties can be referenced through expressions and are referenced.
As far as I know there is no way to use expressions to reference any properties in the view tab.
wmayer
Site Admin
Posts: 14798
Joined: Thu Feb 19, 2009 10:32 am

Re: App::Link: Toggling visibility touches containing Part

Postby wmayer » Fri Aug 23, 2019 9:21 pm

DeepSOIC wrote:
Fri Aug 23, 2019 4:00 pm
wmayer wrote:
Fri Aug 23, 2019 3:36 pm
This behaviour has changed recently. ... this has nothing to do with the Link3 branch.
OK, thanks. And what do you think of the first part, Part getting touched?
I also find this behaviour a bit weird.
BTW, the reason I don't want GUI stuff be interpreted as a change is somewhat personal and weird... so don't bother, unless you have nothing else to do (I totally know that's never the case).
I add a note to my to-do list and implement a parameter to disable it. Is it OK that you can change this in the parameter editor only?
You know, I sometimes open some project for looking up something. Then, I switch to something else and else and so on... and a week or so later, when I decide to close everything, FreeCAD (or can be Excel or whatever) pops me up with "save changes?" prompt. I find myself wondering, what did I change in that project, was it important, and I struggle. Usually, I check the undo stack to help me recall what it was. So I just don't want to have an unnecessary prompt. But since undo stack will be empty in this case, it won't be a big head-scratcher anyway.
But a document is already marked touched directly after loading a project and this is IMO a bug.
User avatar
DeepSOIC
Posts: 6969
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: App::Link: Toggling visibility touches containing Part

Postby DeepSOIC » Fri Aug 23, 2019 9:40 pm

wmayer wrote:
Fri Aug 23, 2019 9:21 pm
Is it OK that you can change this in the parameter editor only?
absolutely :D