Assigning a material without an appearance reset the appearance to the
default appearance.
There were two main problems. One was the comparison function for
App::Material objects. It would return false when the UUID or MatType
values were different although there are many circumstances where this
could be true and the appearance be the same. It also incorrectly
compared the imagePath.
The second problem was the logic for detecting if an object has already
been assigned an appearance by assigning a material or manually setting
the appearance. If assigned a material, the appearance should update but
not if it has been set manually. This logic has been corrected.
* Core: Convert transparency to alpha
Create new `Base::getVersion()` function for extracting a program
version enumeration given a version string.
Convert transparency to alpha value for old project files.
* Base/App: Address review comments
---------
Co-authored-by: wmayer <wmayer@freecad.org>
* Core: workaround for Building US unit system bug
Fixes#11345
This workaround should hopefully fix the Building US unit system bug at the level of the InputField code. This is the most feasible solution given that we are currently in the v1.1 feature freeze.
I use the word "hopefully" because I have not compiled and tested the code. But replacing `+` with `--` works in Python examples.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix typo in comment
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
For some reason the empty layout was not saved for users with existing
config. To ensure that the change does not affect existing users and is
persistent for current ones we need to save value with older default
before using it. Previous solution did not work correctly as the widgets
were not persisted correctly.
This basically is due to how OverlayTabWidget::setRect is implemented. If it faces width (or
height) of 0 it forces the width to be minimumOverlayWidth * 3, which in the default config
appears to be 90. 90 is obviously way too small of a value to display any widget in the side
panel, so we need to basically need to treat anything smaller or equal to that as an
incorrect value for width. We use here 100 just to be safe.
For the height value of 100 may be reasonable, so we leave it as is.
This change tries to detect invalid state where overlay was
half-initialized that resulted in overlay being enabled for more users
that we initially aimed for.
* Connect Bool checkbox checkStateChanged to the editor callback so changes will actually happen.
Make the change compatible with Qt versions <6.7.0
* Remove delayed singleshot-value changed from the event filter for Checkbox as suggested by @pieterhijma
* Remove no longer relevent comment
As the title says - currently if user clicks "Box" from the autocomplete
dropdown, it adds "Box.", but the property drop-down is never resolved
further, so user has to delete the separator and write it by hand.
When a completion ends with '.' or '#' and is being selected by
clicking, code sets `block=true` and calls `slotTextChanged()` which
prevents the `textChanged2` signal from being emitted. This results in
completer being blocked from updating next level of properties.
So, this patch adds a direct call to `completer->slotUpdate()`, which
triggers completer to parse the expression and show the drop-down.
* Fix the selector of the FileDialog and add the same default settings for the ColorDialog.
* Add option to set the default ColorDialog
* Use system dialog by default
* Remove new env var
* Fix the native file dialog selector
* Adjust env variable name
* Adjust env variable name
The actual fix here is for a compile error which started appearing as an
error due to `unistd.h` include being included implicitly from
`boost::signals`, which FastSignals does not do anymore.
```
Error:
/Users/runner/work/FreeCAD/FreeCAD/src/Gui/Dialogs/DlgVersionMigrator.cpp:366:5:
error: use of undeclared identifier '_exit'
```
After completing Edit->Alignment, main window remains small instead of
maximized. It looks like this is Qt 6 regression as the automatic
maximization behavior was somehow changed. Previously it didn't need
explicit handling to restore the maximisation.
So, this patch preserves the previous window state before entering
Alignment editor and restores window being maximized/minimized or normal
upon finishing the operation.
src/Gui/QuantitySpinBox.cpp:
- Call updateExpression() after setExpression() in QuantitySpinBox
src/Gui/SpinBox.cpp:
- Call updateExpression() after setExpression() in ExpressionSpinBox
src/Gui/Widgets.cpp:
- Call onChange() after setExpression() in ExpLineEdit
src/Mod/CAM/Path/Base/Gui/Util.py:
- Connect to showFormulaDialog signal and refresh CAM QuantitySpinBox Python wrapper when dialog closes