Commit Graph

3350 Commits

Author SHA1 Message Date
Roy-043
744ef19866 Draft: Task panel checkboxes were repositioned by accident
In a previous PR of mine I have reorganized some lines of code in DraftGui.py without realizing that this would reposition checkboxes. This PR fixes that.
2024-01-17 11:00:40 +01:00
Kevin Martin
359a3487ed Move the "Treat ellipses and splines as polylines" to DXF *output* options
This option control DXF export but was confusingly in the Import options area. Fixes #11659
2024-01-11 15:58:26 +01:00
Roy-043
6ce705bc58 Draft: remove reapply_diffuse_color workaround
The function would trigger the creation of duplicate Draft Polar Arrays (only on Linux and only if the Fuse option is selected and the Link Array option deselected).
Forum topic:
https://forum.freecad.org/viewtopic.php?t=84090

The reapply_diffuse_color function is no longer required anyway as Issue #8340 has been fixed.
2024-01-10 16:46:49 +01:00
Roy-043
8ea799bd61 Draft: gui_snapper: setTrackers can be called if there is no 3D view 2024-01-05 10:50:46 +01:00
Chris Hennes
fce7dea6f7 Update translations (#11886)
* Update 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>
2024-01-03 09:27:18 -06:00
Roy-043
8d8f429d89 Draft: improve checkSpecialChars in DraftGui.py 2023-12-23 10:33:54 +01:00
Yorik van Havre
651fc54a8c merged crowdin translations 2023-12-20 09:27:37 +01:00
Yorik van Havre
1f65348080 Updated ts files 2023-12-20 09:27:37 +01:00
Roy-043
06a321eb80 Draft: intermediate fix for get_normal: check if 3D view exists
This avoids issues with TechDraw views of Arch models if there is no active 3D view.
2023-12-16 20:30:45 +01:00
Roy-043
0845671608 Draft: implement new get_param functions (step 6)
See #11677

Added a parameter to the dictionary. The get_parameter and set_parameter functions now print a warning if a parameter is not found.
2023-12-15 14:59:59 +01:00
Roy-043
20f32c4bf1 Draft: implement new get_param functions (step 5)
See #11677

Last bits...
2023-12-14 15:53:45 +01:00
Kevin Martin
00cbc6bab1 Remove the "legacy only" from the import colors option 2023-12-14 10:15:17 +01:00
Kevin Martin
37e6c19a4b Add hooks so Gui classes can be seen by DXF importer 2023-12-14 10:15:17 +01:00
Roy-043
16e5835aa6 Draft: implement new get_param functions (step 4)
See #11677
2023-12-13 19:39:35 +01:00
Roy-043
14482b1f8e Moved another import 2023-12-13 16:32:15 +01:00
Roy-043
bd19d331f5 Moved an import to avoid circular import 2023-12-13 09:59:08 +01:00
Roy-043
822f2111e3 Draft: implement new get_param functions (step 3)
See #11677
2023-12-12 20:20:03 +01:00
Roy-043
b0aa33f92a Draft: implement new get_param functions (step 2)
See #11677
2023-12-12 14:48:09 +01:00
Roy-043
59753260c9 Draft: implement new get_param functions (step 1)
See #11677
2023-12-11 19:31:34 +01:00
Roy-043
ea59cce36e Draft: increase DXF Python library version to 1.42
See: https://github.com/yorikvanhavre/Draft-dxf-importer/pull/28
2023-12-11 12:40:47 +01:00
Roy-043
4d00c0f43c Draft: new get_param function with defaults
This PR introduces a new get_param function. For its default values it checks a dictionary largely filled by reading the preferences UI files. The goal is to have all defaults in one place to avoid inconsistencies. The dictionary is created once and then stored in a global variable.

Once merged this function will be implemented in Draft and Arch. The get_param function in utils.py will become obsolete.

Related issue: #10176
2023-12-11 10:18:50 +01:00
Roy-043
f7fa76b975 Draft: minor improvement to prefs layouts 2023-12-10 15:22:43 +01:00
Roy-043
79eaa01032 Draft: Introduce DefaultAnnoScaleMultiplier parameter
This parameter replaces DraftAnnotationScale.

The parameter can be changed in the preferences and with the Draft_SetStyle command.
2023-12-09 19:17:36 +01:00
Roy-043
6e86e9efa2 Draft: use MarkerSize for snap and tracker markers 2023-12-08 21:17:34 +01:00
Roy-043
770eb5e64a Draft: remove maxSnap parameter
It is superfluous. The maxSnapEdges parameter can be set to zero.
2023-12-08 12:06:36 +01:00
Roy-043
26adc417a9 Draft: remove the Draft_ToggleContinueMode command
Rarely used as Continue mode can also be checked in the task panel of Draft commands.
2023-12-05 22:31:44 +01:00
Roy-043
652c0fb752 Draft: menu texts to sentence case 2023-12-04 10:44:59 +01:00
Roy-043
6db658255f Draft: update Draft_ApplyStyle
The command now applies all style properties from `utils.get_default_annotation_style()` and `utils.get_default_shape_style()`.

Additionally: minor improvements to gui_setstyle.py.
2023-12-02 13:11:08 +01:00
Roy-043
e64bb9f499 Draft: update Draft_SetStyle
* Added handling of DefaultShapeVertexColor, DefaultShapePointSize, DefaultAnnoLineColor and DefaultAnnoLineWidth preferences.
* Rearranged the task panel.

Additionally the DefaultDrawStyle and DefaultDisplayMode preferences are now applied by format_object in gui_utils.py.
2023-11-30 21:19:48 +01:00
Roy-043
35993c79ca Draft: implement DefaultAnnoLineWidth and DefaultAnnoLineColor prefs
The format_object function in gui_utils.py still requires some work (in connection with the Draft_SetStyle command). This will be done later.
2023-11-30 09:45:19 +01:00
Roy-043
227f2d5d69 Draft: Revised preference ui files
* Removed DefaultAnnoDisplayMode. This will become a fine-tuning preference.
* Removed HatchPatternResolution as it was not used.
* Added DefaultAnnoLineColor and DefaultAnnoLineWidth. These will be implemented in other parts of the Draft code in later PRs.
2023-11-30 09:44:05 +01:00
Roy-043
904b37b47d Draft: implement DefaultAnnoLineWidth and DefaultAnnoLineColor prefs
The format_object function in gui_utils.py still requires some work (in connection with the Draft_SetStyle command). This will be done later.
2023-11-29 23:06:17 +01:00
Roy-043
10fd4c8104 Draft: Revised preference ui files
* Removed DefaultAnnoDisplayMode. This will become a fine-tuning preference.
* Removed HatchPatternResolution as it was not used.
* Added DefaultAnnoLineColor and DefaultAnnoLineWidth. These will be implemented in other parts of the Draft code in later PRs.
2023-11-29 23:06:17 +01:00
Roy-043
c82d50200d Draft: Revised preference ui files
* Removed DefaultAnnoDisplayMode. This will become a fine-tuning preference.
* Removed HatchPatternResolution as it was not used.
* Added DefaultAnnoLineColor and DefaultAnnoLineWidth. These will be implemented in other parts of the Draft code in later PRs.
2023-11-29 15:05:16 +01:00
Roy-043
4bcdb7cb1c Draft: use param observer to update tray 2023-11-27 23:56:00 +01:00
Yorik van Havre
fac94ba932 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
a462e8e616 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
9f235c281e Draft: use clearer snap marker names 2023-11-25 19:29:12 +01:00
Roy-043
3aa08c96ea Draft: use consistent is-number string in DraftGui.py 2023-11-25 15:59:29 +01:00
Roy-043
a3f285cb46 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
8298396350 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
0973eb6b6f Draft: gui_selectplane can rely on ParamObserver for grid changes 2023-11-24 12:18:57 +01:00
Roy-043
9bcb7cbc7e Draft: Gui.ActiveDocument.ActiveView.getActiveObject has changed
See #10405.
2023-11-24 12:08:28 +01:00
Yorik van Havre
b54642bf93 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
8944c79ebe 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
f683681e92 Remove 2 unused variables 2023-11-23 09:43:48 +01:00
Roy-043
842eedbf4b 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
6b1a460a22 Draft: add parameter observer
To avoid having to restart FreeCAD after changing parameters.
2023-11-21 20:42:16 +01:00
Roy-043
0734b518b4 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
eab0933a36 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