Regression in git: PartDesign feature Hole UI broken
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Regression in git: PartDesign feature Hole UI broken
In the git version, the UI of PartDesign hole discards the CutType.
Setting the type in the property-list works.
Take the attached example and try to set the hole cut type to “Countersink” oder “Counterbore” in the UI. It get’s displayed correctly while the dialog is open, but the moment you click O.K. the setting is lost.
Setting the type in the property-list works.
Take the attached example and try to set the hole cut type to “Countersink” oder “Counterbore” in the UI. It get’s displayed correctly while the dialog is open, but the moment you click O.K. the setting is lost.
- Attachments
-
- test.FCStd
- (14.13 KiB) Downloaded 72 times
Re: Regression in git: PartDesign feature Hole UI broken
Prolem seems to be commit fe3f1b51b7be58367d08c5bb0f9f9d292671bb39
Re: Regression in git: PartDesign feature Hole UI broken
Direct link, git commit fe3f1b51b7.
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.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
Re: Regression in git: PartDesign feature Hole UI broken
wmayer wrote: pinged by pinger macro
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Regression in git: PartDesign feature Hole UI broken
I have reverted this commit again. The problem is that the feature overrides the enumerations with the exact same values when clicking OK.
To fix the actual issue #0004371 it's better to handle this in the PropertyEnumeration. The current implementation is:
but this doesn't make much sense as it's not checked that the new enumeration has at least as many items as the old one.
See also:
https://forum.freecadweb.org/viewtopic.php?f=13&t=47584
https://forum.freecadweb.org/viewtopic.php?f=3&t=50611
To fix the actual issue #0004371 it's better to handle this in the PropertyEnumeration. The current implementation is:
Code: Select all
void PropertyEnumeration::setEnums(const char **plEnums)
{
// Setting the enum is done only once inside the constructor
// but before the current index is already set. So, this needs
// to be preserved.
int index = _enum._index;
_enum.setEnums(plEnums);
_enum._index = index;
}
See also:
https://forum.freecadweb.org/viewtopic.php?f=13&t=47584
https://forum.freecadweb.org/viewtopic.php?f=3&t=50611
Re: Regression in git: PartDesign feature Hole UI broken
With my version I cannot confirm this behaviour. When changing the type to Countersink or Counterbore the Diameter filed becomes active.OK, but now selecting a Hole Cut Type won't enable the Diameter field:
OS: Ubuntu 18.04.5 LTS (XFCE/xubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22865 (Git)
Build type: Debug
Branch: master
Hash: 3c307b7a3c222d66cb70695cdcf79606553fcb91
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
Re: Regression in git: PartDesign feature Hole UI broken
I too see this behavior in appimage
OS: Ubuntu 20.04.1 LTS (MATE/mate)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22894 (Git) AppImage
Build type: Release
Branch: master
Hash: 9eb080488d970d313c538473e7272117ea0a7cd1
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
also in daily
OS: Ubuntu 20.04.1 LTS (MATE/mate)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: 9eb080488d970d313c538473e7272117ea0a7cd1
Python version: 3.8.5
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.3.0
Locale: English/United States (en_US)
- Attachments
-
- hole.gif (256.88 KiB) Viewed 2062 times
Re: Regression in git: PartDesign feature Hole UI broken
Yes.
As far as I can see, the read-only flags are set correct, but are not propagated to the UI.
I can fix it with this:
but I’m not sure if this is the correct way to do.
As far as I can see, the read-only flags are set correct, but are not propagated to the UI.
I can fix it with this:
Code: Select all
+ ProfileBased::onChanged(&HoleCutDiameter);^M
+ ProfileBased::onChanged(&HoleCutDepth);^M
+ ProfileBased::onChanged(&HoleCutCountersinkAngle);^M
wmayer wrote: pinged by rynn
Re: Regression in git: PartDesign feature Hole UI broken
This should be OK. The dialog has the method TaskHoleParameters::changedObject and can directly react on changes of the hole feature.but I’m not sure if this is the correct way to do.
Feel free to create a PR.