Commit Graph

21 Commits

Author SHA1 Message Date
Roy-043
b07ff3eeb5 Draft: menu texts of snaps to sentence case 2023-11-15 14:59:38 +01:00
Roy-043
e920410607 Draft: housekeeping: rename snap icons 2022-11-11 17:33:09 +01:00
Roy-043
1eee16e9f3 Draft: Change Snap toolbar to standard toolbar 2022-10-27 10:45:48 +02:00
carlopav
cd19082ac6 Update src/Mod/Draft/draftguitools/gui_snaps.py
Co-authored-by: Yorik van Havre <yorik.vanhavre@gmail.com>
2021-08-30 13:57:04 +02:00
carlopav
543aad45f7 Draft: fixed Snap behaviour when no document is active.
Draft toolbar and statusbar can be activated also when no document is active, because Snap is not related to active document.
2021-07-11 10:09:46 +02:00
marioalexis
bc60c93266 Draft: Fix regression in sync_snap_toolbar_button function 2021-03-14 17:14:58 -03:00
Chris Hennes
d78017f2e0 [Draft] Return once the button is found 2021-02-28 21:48:31 -06:00
Chris Hennes
58a6f05956 [DRAFT] Refactor sync_snap_toolbar_button
LGTM objected to the re-use of the loop variable a in the algorithm.
Upon closer inspection, the algorithm in this function could be modified
to match the algorithm in sync_snap_statusbar_button (which does the
same thing to the statusbar that this does to the toolbar). This
eliminates the double-use. This change does not affect the functionality
of the routine.
2021-02-28 21:42:46 -06:00
Yorik van Havre
686df593ea Draft: Applied patch from nahshon - fixes misc errors from translation fixes 2021-02-15 15:50:45 +01:00
wmayer
2b881cccad Draft: fix syntax errors 2021-02-13 12:14:12 +01:00
Yorik van Havre
43feb585ad Draft: Fixed broken translations everywhere 2021-02-12 14:44:58 +01:00
vocx-fc
e3da572072 Draft: add modules of draftguitools to the proper Doxygen group
This includes `gui_annotationstyleeditor`, `gui_arcs`, `gui_array_simple`,
`gui_arrays`, `gui_base`, `gui_base_original`, `gui_beziers`,
`gui_circles`, `gui_circulararray`, `gui_clone`, `gui_circulararray`,
`gui_clone`, `gui_dimension_ops`, `gui_dimensions`, `gui_downgrade`,
`gui_draft2sketch`, `gui_drawing`, `gui_edit`, `gui_edit_arch_objects`,
`gui_edit_draft_objects`, `gui_edit_part_objects`, `gui_edit_sketcher_objects`,
`gui_ellipses`, `gui_facebinders`, `gui_fillets`, `gui_grid`,
`gui_groups`, `gui_heal`, `gui_join`, `gui_labels`, `gui_line_add_delete`,
`gui_lineops`, `gui_lines`, `gui_lineslope`, `gui_mirror`,
`gui_move`, `gui_offset`, `gui_orthoarray`, `gui_patharray`,
`gui_planeproxy`, `gui_pointarray`, `gui_points`, `gui_polararray`,
`gui_polygons`, `gui_rectangles`, `gui_rotate`, `gui_scale`,
`gui_selectplane`, `gui_shape2dview`, `gui_shapestrings`, `gui_snapper`,
`gui_snaps`, `gui_splines`, `gui_split`, `gui_stretch`, `gui_styles`,
`gui_subeleemnts`, `gui_texts`, `gui_togglemodes`, `gui_tools_utils`,
`gui_trackers`, `gui_trimex`, `gui_upgrade`, `gui_wire2spline`.

These are added to the `draftguitools` Doxygen group
so that the functions and classes contained in each module
are listed appropriately in the automatically generated
documentation.
2020-07-17 13:01:45 +02:00
vocx-fc
cc75bf91d7 Draft: change super() so it is compatible with Python 2
In Python 3 `super()` can be used without an argument
in order to get the parent class, `super()`.
In Python 2 the present class must be used as an argument,
`super(ThisClass, self)`.

This commit is done to support Python 2,
as without it all Gui Command tools will be broken
and will fail to launch, even if the unit tests pass.

Also, set the `__metaclass__` variable to `type`.
This is done to turn all classes into "new style" classes
in Python 2. This is required so `super()` works correctly
in this version of Pyton.

This commit can be reverted once Python 2 support
is completely dropped, and only Python 3 compatible code
is used.
2020-04-27 11:05:51 +02:00
carlopav
18cfafeed8 Draft: reintroduced grid button in snap toolbar 2020-04-22 12:14:23 +02:00
carlopav
c857754460 [Draft] Further cleanup of the branch
thanks to vocx revisions
2020-04-20 12:38:06 +02:00
carlopav
64db721998 [Draft] Snap improvement and statusbar cleanup after rebase
[Draft] Attempt to make base classes compatible with super on py2


[Draft] Refactored imports of snapper and snaps gui tools


.


.
2020-04-20 12:38:06 +02:00
carlopav
55e537d79d [Draft] Improved Snapper Toolbar Behaviour
Changed snap toolbar behaviour:
- create a list of available snaps (Gui.Snapper.snaps)
- make it consistent with Snap Gui Commands (in gui_snaps module)
- create a list of active snaps (Gui.Snapper.active_snaps)
- refactor the isEnabled() method to allow it to check if the given snap is in Gui.Snapper.active_snaps and not if the snap toolbar button isChecked()
- updated and reordered the new list of gui snap commands in draftutils.init_tools and used it as a base to refactor the creation of draft toolbar
- updated all the draft snap gui tools to make them control the toolbar buttons directly
.


.


.
2020-04-20 12:38:06 +02:00
vocx-fc
1ed3df9df0 Draft: add base class for Snap commands 2020-04-16 11:40:58 +02:00
vocx-fc
11206b1d3a Draft: move Draft_ShowSnapBar to gui_snaps module 2020-04-16 11:40:58 +02:00
vocx-fc
009a7aacf9 Draft: gui_snaps cleanup 2020-04-07 18:12:06 +02:00
vocx-fc
f1a3e14226 Draft: move snap commands to an individual module
This way we remove lines from `DraftTools.py`
and we can more easily identify where the snapping
commands are defined.
2020-03-20 08:11:04 -03:00