Commit Graph

204 Commits

Author SHA1 Message Date
Chris Hennes
cbb10b0496 Draft: Remove trailing spaces from translations 2024-03-12 22:42:20 -05:00
Roy-043
8e6a308e03 Draft: applyConstructionStyle was missing in params.py 2024-03-04 11:33:10 +01:00
Roy-043
cbd27854df Draft: update DefaultShapeColor in params.py to match new default 2024-02-19 10:11:48 +01:00
Roy-043
3b3ed05dc8 Draft: fix wrong selection after commands
Fixes #10469

The code of the `end_all_events()` function is by Chris Hennes (chennes).
See https://forum.freecadweb.org/viewtopic.php?p=656362#p656362.
2024-02-12 11:32:58 -06:00
Kevin Martin
02ebb17558 Eliminate many "doing what you told me to" messages
These messages were perhaps originally intended as a debuggin aid but now add clutter to the output panes. Remaining messges are mostly the result of methods to display attributes of an object (which one could call from the Python console) or actually provide some information which would not be obvious from the circumstances
2024-02-02 08:58:45 -05:00
Roy-043
0eb8f1f750 Draft: Avoid draftToolBar.getDefaultColor outside DraftGui.py
The draftToolBar.getDefaultColor() function is an indirect way of retreiving a parameter. It is better to avoid it where possible.
2024-02-01 18:02:10 +01:00
Roy-043
89bca1ee93 Merge pull request #12111 from 3x380V/draft_wb_qt6
Draft: Qt6 fixes
2024-01-31 11:31:38 +01:00
Roy-043
bd3e78691e Draft: Scale widget did not handle FEM unit system
The FEM UserSchema (8) was not handled by the code.
2024-01-26 13:09:07 +01:00
Ladislav Michl
05b0f35655 Draft: Use widgets from QtWidgets 2024-01-25 14:27:38 +01:00
Roy-043
544bd1e7ea Arch: implement new get_param functions
Additionally 2 Arch_Window bugs were fixed:
* If the W1 value was changed the box tracker was not repositioned relative to the cursor.
* The WindowColor was not applied because of a typo in the code. De current default color is quite dark BTW.

Note that all dimensional values that were not really defaults, but just the last entered values, have been removed from preferences-archdefaults.ui. As a result the layout looks a bit strange. That will be improved in a next PR.
2024-01-18 15:43:15 +01:00
Roy-043
1fa7eb76c6 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
c2e16f2525 Draft: implement new get_param functions (step 5)
See #11677

Last bits...
2023-12-14 15:53:45 +01:00
Roy-043
d0a87b24d9 Draft: implement new get_param functions (step 4)
See #11677
2023-12-13 19:39:35 +01:00
Roy-043
17e5ef969c Moved another import 2023-12-13 16:32:15 +01:00
Roy-043
3e9b037c44 Moved an import to avoid circular import 2023-12-13 09:59:08 +01:00
Roy-043
12444a1d6b Draft: implement new get_param functions (step 3)
See #11677
2023-12-12 20:20:03 +01:00
Roy-043
3d9c520b0d Draft: implement new get_param functions (step 2)
See #11677
2023-12-12 14:48:09 +01:00
Roy-043
56d73f39ac Draft: implement new get_param functions (step 1)
See #11677
2023-12-11 19:31:34 +01:00
Roy-043
4262da5fc1 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
56b8f76cfb 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
c0e774f15c 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
640bd5cf26 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
b4c3a0d963 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
92d69c9641 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
9b19b66d90 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
6c015072eb 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
096f77d28c Draft: use param observer to update tray 2023-11-27 23:56:00 +01: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
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
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
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
DeflateAwning
8de6db3e97 Find and replace http://freecad.org to https://freecad.org
Find and replace:
http:\/\/(.{0,10})freecad
https://$1freecad
Done in all remaining files (after doing it in SVGs in the last commit)
2023-10-29 22:39:22 -06:00
Roy-043
a1b8a2ec70 Draft: Change get_3d_view to only return the active 3D view (#11050)
Related issue:
#10634

Also needed to avoid warnings from the PlaneGui class.
2023-10-15 14:28:32 +02:00
Roy-043
3847db56d5 Draft: get_movable_children: prevent endless loop
Forum topic:
https://forum.freecad.org/viewtopic.php?t=81547
2023-09-28 15:19:25 +02:00
Roy-043
ba6a45d9db Draft: Fix get_diffuse_color function (#9932) 2023-07-18 10:45:38 +02:00
Yorik van Havre
aed5db5f10 Draft: allow autogroup to add an object to both a layer and an Arch/NativeIFC container 2023-06-13 12:24:14 +02:00
Yorik van Havre
acb05aad15 Draft: Provision for NativeIFC autogrouping 2023-06-07 13:02:49 +02:00
Roy-043
f0560ac207 Draft: Add TextSpacing to Draft_AnnotationStyleEditor (#9702)
Also reordered the dialog a little.
2023-06-03 10:54:49 +02:00
luzpaz
cd6efa23c6 Draft: modfified translate function to allow comments
Also fixed incorrect typos in previous commit
2023-05-04 13:28:10 +00:00
luzpaz
129d5882a7 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
mosfet80
889ad11e02 [Draft] Remove obsolete code related to Drawing WB
* [Draft] Remove obsolete code related to Drawing WB




remove unused elif

* [Draft] Remove obsolete code related to the Drawing WB

* Update preferences-draftvisual.ui

Also remove the template label.

* Update utils.py

Remove reference to "template"

* Remove Draft_Drawing.svg from Draft.qrc

---------

Co-authored-by: Roy-043 <info@b-k-g.nl>
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2023-04-03 16:36:23 +02:00
Roy-043
87b0893044 [Draft] Remove obsolete decode code (#9106) 2023-03-28 21:03:33 +02:00
Paddle
db65bb751d Draft: Remove unit selector in status bar as it is now implemented in core's sizeLabel. 2023-03-17 14:04:24 +00:00
Yorik van Havre
5c471bef37 Draft: Added LayerManager command from BIM 2023-03-09 14:26:09 +01:00