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
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

App::Link: Toggling visibility touches containing Part

Post by DeepSOIC »

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 19 times
User avatar
furti
Posts: 344
Joined: Mon Nov 27, 2017 5:27 pm

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

Post by furti »

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
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

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

Post by wmayer »

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
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

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

Post by DeepSOIC »

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
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

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

Post by vocx »

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.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

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

Post by DeepSOIC »

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
Veteran
Posts: 4162
Joined: Wed Nov 21, 2018 1:13 pm

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

Post by kisolre »

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
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

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

Post by TheMarkster »

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
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

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

Post by wmayer »

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
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

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

Post by DeepSOIC »

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