Commit Graph

3316 Commits

Author SHA1 Message Date
Roy-043
096f77d28c Draft: use param observer to update tray 2023-11-27 23:56:00 +01:00
Yorik van Havre
3ade39ccf1 Translations (#11551)
* Updated ts files

* merged crowdin translations

* [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>
2023-11-27 11:29:38 -06:00
Roy-043
484bbf3807 Draft: improve handling of anno DisplayMode and LineSpacing
* DisplayMode controlled by new pref DefaultAnnoDisplayMode. This replaces the old dimstyle pref.
* LineSpacing pref is now used when creating annotations. Will be added to prefs ui later.
* format_object no longer changes FontSize as this conflicted with the height parameter in the make_text function.
* make_text function updated.
2023-11-27 15:45:56 +01:00
Roy-043
b9d8f0a999 Draft: use clearer snap marker names 2023-11-25 19:29:12 +01:00
Roy-043
97e13c14d0 Draft: use consistent is-number string in DraftGui.py 2023-11-25 15:59:29 +01:00
Roy-043
c36979f156 Draft: improve Snap bar show-hide preference
This PR replaces the showSnapBar and hideSnapBar preferences with a single new preference: SnapBarShowOnlyDuringCommands.

Additonally:
Improved some param observer callbacks.
2023-11-24 13:30:03 +01:00
Roy-043
70d2731483 Merge pull request #11509 from Roy-043/Draft-getActiveObject-has-changed
Draft: Gui.ActiveDocument.ActiveView.getActiveObject has changed
2023-11-24 12:46:07 +01:00
Roy-043
b5d8e17341 Draft: gui_selectplane can rely on ParamObserver for grid changes 2023-11-24 12:18:57 +01:00
Roy-043
387d1d1fd9 Draft: Gui.ActiveDocument.ActiveView.getActiveObject has changed
See #10405.
2023-11-24 12:08:28 +01:00
Yorik van Havre
b1bcfec271 Draft: Added a preference to turn on/off tool messages (off by default) - fixes #7078 2023-11-23 16:27:36 +01:00
Roy-043
b5adfff293 Draft: make default anno style non-global
Additionally:
* Added the DimShowLine preference. Layout of the tab will be updated later.
* Improved handling of DraftAnnotationScale preference: catch division by zero and use it for the default anno style.
2023-11-23 09:45:12 +01:00
Roy-043
0fdbf9726f Remove 2 unused variables 2023-11-23 09:43:48 +01:00
Roy-043
3fef8bfca0 Draft: param observer: improve handling of statusbar widgets
The Draft statusbar widgets should not be displayed in the Arch and BIM workbenches.

Also updated the copyright header to the current standard.
2023-11-23 09:43:48 +01:00
Roy-043
ccd7d33d70 Draft: add parameter observer
To avoid having to restart FreeCAD after changing parameters.
2023-11-21 20:42:16 +01:00
Roy-043
6960f95a00 Merge pull request #11477 from Roy-043/Draft-improved-handling-of-snap-prefs
Draft: improved handling of snap prefs
2023-11-21 18:40:42 +01:00
Roy-043
d592a0ffc6 Merge pull request #11467 from Roy-043/Draft-make-mod-key-prefs-non-global
Draft: make mod key prefs non-global
2023-11-21 18:40:10 +01:00
Roy-043
94a649b128 Draft: improved handling of snap prefs
* Some trackers had 2 color nodes.
* Added a setColor function to some trackers.
* Added a set_snap_style function to the Snapper class.
2023-11-21 17:14:17 +01:00
Roy-043
f2b1051d25 Draft: make mod key prefs non-global 2023-11-20 21:17:18 +01:00
Chris Hennes
90dc4aeb13 Update translations 2023-11-20 13:46:22 -06:00
Roy-043
9563a40e32 Draft: gridShowHuman did not work
* The gridBorder pref was ignored.
* BimProject has been renamed to BimProjectManager.
2023-11-20 19:54:24 +01:00
Roy-043
6d83326307 Draft: store more command modes in prefs
With this PR the following 5 command modes are automatically stored in the preferences:
* "ContinueMode"
* "RelativeMode"
* "GlobalMode"
* "fillmode" (existing preference, removed from the Preferences Editor)
* "SubelementMode"

Additionally:
Three commands (Draft_Ellipse, Draft_Rectangle and Draft_Stretch) call `setRelative` after the 1st point has been specified and would permanently switch on relativeMode. After this PR this switch is temporary.
2023-11-18 21:03:26 +01:00
Roy-043
f30e643c82 Merge pull request #11440 from Roy-043/Draft-make-Draft_Edit-prefs-non-global
Draft: make Draft_Edit prefs non-global
2023-11-18 19:45:00 +01:00
Roy-043
9409f68294 Merge pull request #11436 from Roy-043/Draft-constraining-did-not-respect-global-mode
Draft: constraining did not respect global mode
2023-11-18 19:44:40 +01:00
Roy-043
34e49b50d8 Draft: make Draft_Edit prefs non-global 2023-11-18 19:18:23 +01:00
Roy-043
f6f0ace4c7 Draft: constraining did not respect global mode
Fixes #10496.
2023-11-18 13:36:35 +01:00
Roy-043
03e8ac4ac6 Draft: make in-command shortcuts non-global
Fixes #8329.
2023-11-17 12:57:56 +01:00
Roy-043
e9e4554c06 Draft: minor updates related to precision pref 2023-11-17 09:49:01 +01:00
Roy-043
c3a3100137 Draft: Draft_Join should call join_wires
Also removed an obsolete comment.
2023-11-16 21:02:19 +01:00
Roy-043
daea162ae2 Draft: prefs: remove copymode, useSupport no longer via UI
This PR removes the copymode (Global copy mode) preference.

Forum topic:
https://forum.freecad.org/viewtopic.php?t=82679

Additionally useSupport is removed from preferences-draft.ui, turning it into a fine-tuning preference. Use of this feature is rare and may not be supported in the future. No need to present this preference to new users in the UI.

Forum topic:
https://forum.freecad.org/viewtopic.php?t=80689
2023-11-16 11:40:23 +01:00
Roy-043
b07ff3eeb5 Draft: menu texts of snaps to sentence case 2023-11-15 14:59:38 +01:00
Roy-043
0f76aaab86 Draft: cleanup related to PR11336
See #11336
2023-11-14 11:51:34 +01:00
Roy-043
db970b0ab3 Merge pull request #11387 from Roy-043/Draft-more-file-extensions-also-in-caps
Draft: more file extensions also in caps
2023-11-14 10:34:14 +01:00
Roy-043
3f7dedf8a4 Typos 2023-11-14 00:04:33 +01:00
Roy-043
7ac0a44136 Draft: more file extensions also in caps 2023-11-13 23:12:18 +01:00
Roy-043
17f2146887 Draft: remove the tolerance preference
The tolerance function now derives its value from the precision preference.

Additonally:
Removed the epsilon() function. It did not make sense and was not used.
2023-11-13 18:07:37 +01:00
Roy-043
29fda5e974 Draft: remove unused dimorientation and saveonexit prefs 2023-11-12 20:54:25 +01:00
Roy-043
c7777b8ed3 Draft: Draft_SelectPlane did not trigger the grid 2023-11-12 20:16:34 +01:00
Roy-043
453c099873 Draft: Improve grid behavior
This PR improves the behavior of the Draft grid:
* Options in the preferences: "Always show the grid" and "Show the grid during commands".
* The parameters are used for new views. In existing views the grid can be toggled either during a command or when no command is active.
* When switching to a different workbench all grids are hidden unless GridHideInOtherWorkbenches is set to `False`. This can be a Fine-tuning parameter IMO.

Notes:
* The defaultCameraHeight parameter becomes obsolete. It was only used in very specific circumstances.
* The code of PR #8818 becomes obsolete. It makes more sense to use `App.activeDraftCommand` instead of adding a `tool` argument to some functions. Will do some related cleanup later.
* Improved alignment for the related preference ui. The checkbox interaction has been fixed as well.
2023-11-10 14:02:38 +01:00
Roy-043
704949d843 MEASUREMENT should also be checked if INSUNITS is zero 2023-11-10 10:21:54 +01:00
Roy-043
ab3bb51e15 Avoid Python match function 2023-11-10 10:21:54 +01:00
Roy-043
6ec2ecffe9 Draft: fix import scale for Legacy DXF importer
Fixes #10253.
2023-11-10 10:21:54 +01:00
Chris Hennes
954c2fa03f Update translations 2023-11-09 12:23:56 -06:00
Roy-043
9be9881ed8 Merge pull request #11295 from Roy-043/Draft-improved-props_changed_placement_only-function
Draft: improved props_changed_placement_only function
2023-11-08 15:31:43 +01:00
Roy-043
ec7d3e643f Merge pull request #11257 from Roy-043/Draft-PlaneGui-view-observer-to-update-the-Tray
Draft: PlaneGui: view observer to update the Tray
2023-11-08 15:29:18 +01:00
Roy-043
592547fd60 Draft: renaming of anno style could fail
The error occurred if the style was in use.
2023-11-06 11:40:24 -06:00
Roy-043
1bc942d73a Draft: improved props_changed_placement_only function
There are more objects where `props_changed_placement_only` should always return `False`. The common denominator seems to be a non-empty OutList.

https://github.com/FreeCAD/FreeCAD/issues/8771
https://forum.freecad.org/viewtopic.php?t=82436
2023-11-06 18:33:13 +01:00
Chris Hennes
aaa0db3867 Merge pull request #11231 from DeflateAwning/http-cleanup
Find and replace http://freecad to https://freecad
2023-11-06 11:16:13 -06:00
Roy-043
d72df2f3e2 Draft: PlaneGui: view observer to update the Tray
Related issue:
#5603.

The view observer starts/stops when the Draft workbench is activated/deactivated.

Additionally:
* Minor improvements to _update_grid and _update_gui.
2023-11-05 21:42:44 +01:00
Roy-043
e4d6c328fc Draft: clone IfcType and Subvolume properties
Fixes #11186.
2023-10-31 15:43:33 +01:00
Roy-043
a2e85a4ae1 Draft: Updates related to the PlaneGui class (step 4)
Related issue:
#5603.

For gui_snapper.py and gui_trackers.py an intermediate solution has been adopted. They still rely on App.DraftWorkingPlane, but now use a small function to retreive it.

Simply switching to the PlaneGui class is problematic for the trackers as this results in an endless recursion (wp->grid->wp->...). Using the old App.DraftWorkingPlane (which is kept up-to-date by PlaneGui) solves this for now. I will try to return to this later (which may be after the next release though).
2023-10-31 15:41:21 +01:00