Changing pad length in property editor does not update gui for latest dev version

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
felix342
Posts: 5
Joined: Mon Jun 04, 2018 11:21 am

Changing pad length in property editor does not update gui for latest dev version

Postby felix342 » Fri Nov 16, 2018 9:50 am

In the currently released development version (0.18.15214) attempts to change the pad length in the property editor no longer updates the GUI. It remains possible to change the pad length by right-clicking on the pad and invoking the Edit_Pad dialog (the GUI is then updated and shows the new pad length correctly).

The python console shows the difference between both approaches:

1. Changing pad length in data tab of properties view (a single statement appears in the python console):

Code: Select all

>>> FreeCAD.getDocument("test").getObject("Pad002").Length = '5 mm'
2. Changing pad length via edit pad dialog (multiple statements, non-relevant lines omitted):

Code: Select all

>>> App.ActiveDocument.Pad002.Length = 5.000000
>>> App.ActiveDocument.recompute()
This problem was not present in version 0.18.14956.

It seems that this problem is related to a missing call to recompute() which the property editor may have invoked without showing it on the python console.

In the older version 0.18.14956, if I change the pad length, the gui immediately updates and shows the new pad length. The python console only displays a single statement that changes the length, but if I try to invoke this single command in the python console (changing the pad length a second time), then the gui does not show the change until I request a recompute().

Between both versions something in how calls to recompute are invoked by the property editor has probably changed.
wmayer
Site Admin
Posts: 13747
Joined: Thu Feb 19, 2009 10:32 am

Re: Changing pad length in property editor does not update gui for latest dev version

Postby wmayer » Fri Nov 16, 2018 1:04 pm

In the currently released development version (0.18.15214) attempts to change the pad length in the property editor no longer updates the GUI. It remains possible to change the pad length by right-clicking on the pad and invoking the Edit_Pad dialog (the GUI is then updated and shows the new pad length correctly).
This problem was not present in version 0.18.14956.

It seems that this problem is related to a missing call to recompute() which the property editor may have invoked without showing it on the python console.
I don't have version 0.18.14956 so I can't test its behaviour but when comparing 0.17 and 0.18.15218 then both have the same correct behaviour:
* when changing the pad height inside its dedicated dialog the feature is updated immediately
* when changing the pad height inside the property editor the feature is not updated immediately. To perform an update you must either leave the editor widget or manually click the recompute button

The behaviour of the property editor is exactly how it's supposed to be because it doesn't know anything about the context a property is used and thus doesn't perform an automatic recompute because otherwise this could lead to severe performance problems as under circumstances a recompute can take several minutes.
felix342
Posts: 5
Joined: Mon Jun 04, 2018 11:21 am

Re: Changing pad length in property editor does not update gui for latest dev version

Postby felix342 » Fri Nov 16, 2018 2:02 pm

Maybe may reference to the 'Property Editor' is not clear? I mean the Property editor that shows up in the lower left part of the UI whith the 'View' and 'Data' tabs and I am referring to the 'Data' tab.

My 0.17 version which I just downloaded from the FreeCad site does not behave in the same way as the latest version of 0.18.

In Freecad 0.17. changing the pad length in the property editor immediately changes the pad length in the GUI (and this is the standard behavior in all other parts of the property editor .. change the width or placement of a part, its angle etc. and changes are immediately reflected in the GUI.
wmayer
Site Admin
Posts: 13747
Joined: Thu Feb 19, 2009 10:32 am

Re: Changing pad length in property editor does not update gui for latest dev version

Postby wmayer » Fri Nov 16, 2018 4:56 pm

Maybe may reference to the 'Property Editor' is not clear? I mean the Property editor that shows up in the lower left part of the UI whith the 'View' and 'Data' tabs and I am referring to the 'Data' tab.
Exactly.
n Freecad 0.17. changing the pad length in the property editor immediately changes the pad length in the GUI (and this is the standard behavior in all other parts of the property editor .. change the width or placement of a part, its angle etc. and changes are immediately reflected in the GUI.
Do all the various FreeCAD versions depend on the same library versions? Especially Qt is this still the same?
felix342
Posts: 5
Joined: Mon Jun 04, 2018 11:21 am

Re: Changing pad length in property editor does not update gui for latest dev version

Postby felix342 » Mon Nov 19, 2018 3:57 pm

Do all the various FreeCAD versions depend on the same library versions? Especially Qt is this still the same?
I have the exactly the same Qt version on both FreeCad versions: It is Qt 4.8.7.

Do I understand correctly that we are using FreeCAD on different operating systems and that on your operating system, having to click the Recompute button all the time when you make changes in the property editor has been the standard behavior for a long time? This is not what I have been used to on Windows (I have been using FreeCad since 0.15).
User avatar
Kunda1
Posts: 3809
Joined: Thu Jan 05, 2017 9:03 pm

Re: Changing pad length in property editor does not update gui for latest dev version

Postby Kunda1 » Tue Nov 20, 2018 11:08 am

@felix342 FYI, when asking for help please always post your Help>About FreeCAD> Cooy to clipboard
Thanks
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
wmayer
Site Admin
Posts: 13747
Joined: Thu Feb 19, 2009 10:32 am

Re: Changing pad length in property editor does not update gui for latest dev version

Postby wmayer » Tue Nov 20, 2018 1:55 pm

Do I understand correctly that we are using FreeCAD on different operating systems and that on your operating system, having to click the Recompute button all the time when you make changes in the property editor has been the standard behavior for a long time?
No, I don't have to click the Recompute if I don't want to. I can click the Recompute button if the editor widget that has changed a property still has the focus to manually update the document. Otherwise the document will be updated automatically as soon as the editor widget loses the focus.
felix342
Posts: 5
Joined: Mon Jun 04, 2018 11:21 am

Re: Changing pad length in property editor does not update gui for latest dev version

Postby felix342 » Wed Nov 21, 2018 12:40 pm

@Kunda1
My post was not about help but about a change in behavior that has occurred on the development branch that is probably a bug.

@wmayer
I understand that you have not been able to replicate the behavior. But in my most recent versions, when I make a change to the pad in the property editor, then leave the editor, the document is not updated to reflect the changed pad length. In older versions it was updated when leaving the property editor (or hitting the RETURN key in the active field in the property editor).

Sure, I can work around this. But this looks like a bug...

It's your call whether we should investigate this further (I could install FreeCAD on another computer to see whether this a problem there because you can't replicate it although it is strange that older win64 versions of FreeCAD on my computer don't have this problem while two more recent versions (18.15214 and 18.15195) do have it. The other alternative is to post a bug report or to just ignore this problem.
GeneFC
Posts: 991
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Changing pad length in property editor does not update gui for latest dev version

Postby GeneFC » Wed Nov 21, 2018 3:04 pm

I happen to have a copy of version 0.18.14957, and I see absolutely no difference in behavior between that version and a very recent version, 0.18.15248.

When I change a pad length in the property panel and then change focus the pad updates automatically, without any need to click the recompute icon.

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14957 (Git)
Build type: Release
Branch: master
Hash: 22513600ddc11a8d0d392f67225d443b7dc2e5bb
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15248 (Git)
Build type: Release
Branch: master
Hash: 608d42d3cdce307b585534adfdae9c9af7304436
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)

[EDIT]

Just tried with the Conda/Python 3 version, and see the same consistent behavior.

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15248 (Git)
Build type: Release
Branch: master
Hash: 608d42d3cdce307b585534adfdae9c9af7304436
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

Gene
felix342
Posts: 5
Joined: Mon Jun 04, 2018 11:21 am

Re: Changing pad length in property editor does not update gui for latest dev version

Postby felix342 » Thu Nov 22, 2018 1:20 pm

I found out that that the problem does not occur if I change the length of the pad using the up/down arrows next to the length field. But if I type a different value into the length field and then hit enter, the pad is not updated visually. Strange...

I have downloaded 0.18.15248 and tried it on another PC. Same problem. Below is information about five versions of FreeCad on 2 Windows PCs. On both PCs the latest versions have the problem. The problem must have been introduced between version 0.18.14956 and 0.18.15195.

FreeCAD Versions that have the problem

OS: Windows 7
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.18.15248 (Git)
Build type: Release
Branch: master
Hash: 608d42d3cdce307b585534adfdae9c9af7304436
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15214 (Git)
Build type: Release
Branch: master
Hash: b3721f8613b975be13e1801f499fa06f6f0ad836
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15195 (Git)
Build type: Release
Branch: master
Hash: a7094210f8cb6ea63791bc91b5928a8097278367
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)

Versions that don't have the problem

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14956 (Git)
Build type: Release
Branch: master
Hash: 0e948db5a38bed9b8ac177fb77756161b45489b6
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)

OS: Windows 7
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.17.13528 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: 5c3f7bf8ec51e2c7187789f7edba71a7aa82a88b
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)