Commit Graph

1993 Commits

Author SHA1 Message Date
vocx-fc
5f11802bc0 Draft: move Move GuiCommand to gui_move module 2020-04-24 13:49:13 +02:00
vocx-fc
3370e870fe Draft: move SubelementHighlight to its own module 2020-04-24 13:49:13 +02:00
Yorik van Havre
3802e07f54 Draft: fixed regression in snapper 2020-04-23 12:05:59 +02:00
Yorik van Havre
5b3fea59e0 Draft: Annotation editor 2020-04-22 13:38:17 +02:00
luz.paz
9489776462 LGTM: Fix 'testing equality to None'
Testing whether an object is `None` using the `==` operator is inefficient and potentially incorrect.
2020-04-22 12:18:33 +02:00
carlopav
18cfafeed8 Draft: reintroduced grid button in snap toolbar 2020-04-22 12:14:23 +02:00
carlopav
d59224a4be [Draft] Correct Draft Edit Tooltip in preferences
correction thx to Kunda1
2020-04-22 12:08:29 +02:00
vocx-fc
ace8c98aa8 Draft: move Label GuiCommand to gui_labels module
Also include carlopav's commit ff3bdf86bc for the Draft_Label tool,
which runs the autogroup function on the created label.
2020-04-22 12:07:25 +02:00
vocx-fc
d3646b0577 Draft: move Facebinder GuiCommand to gui_facebinders module 2020-04-22 12:07:25 +02:00
vocx-fc
4c297587c4 Draft: move Point GuiCommand to gui_points module 2020-04-22 12:07:25 +02:00
vocx-fc
afd941b66d Draft: move ShapeString GuiCommand to gui_shapestrings module 2020-04-22 12:07:25 +02:00
vocx-fc
44be767583 Draft: move Dimension GuiCommand to gui_dimensions module 2020-04-22 12:07:25 +02:00
vocx-fc
bec9d01058 Draft: move Text GuiCommand to gui_texts module 2020-04-22 12:07:25 +02:00
vocx-fc
66055ebf14 Draft: move Ellipse GuiCommand to gui_ellipses module 2020-04-22 12:07:25 +02:00
vocx-fc
0e089e998d Draft: move Polygon GuiCommand to gui_polygons module 2020-04-22 12:07:25 +02:00
vocx-fc
59c41fab33 Draft: move Circle GuiCommand to gui_circles module 2020-04-22 12:07:25 +02:00
vocx-fc
ea31a7d452 Draft: move Arc GuiCommand to gui_arcs module
Also move the `ArcGroup` that containst the two arc tools.
2020-04-22 12:07:25 +02:00
vocx-fc
0d891a85e3 Draft: move Rectangle GuiCommand to gui_rectangles module 2020-04-22 12:07:25 +02:00
vocx-fc
689324fe22 Draft: move CubicBezCurve GuiCommand to gui_beziers module
Also move the `BezierGroup` that contains the two Bezier tools.
2020-04-22 12:07:25 +02:00
vocx-fc
17281a250f Draft: move BezCurve GuiCommand to gui_beziers module 2020-04-22 12:07:25 +02:00
vocx-fc
b6cdf9f558 Draft: move BSpline GuiCommand to gui_splines module 2020-04-22 12:07:25 +02:00
vocx-fc
529ec1e1a6 Draft: move Wire GuiCommand to gui_lines module 2020-04-22 12:07:25 +02:00
vocx-fc
934d0f3752 Draft: move Line GuiCommand to gui_lines module 2020-04-22 12:07:25 +02:00
carlopav
b8d7f8df57 [Draft] Fixed scale multiplier for text object 2020-04-21 12:58:20 +02:00
vocx-fc
982a0fdd9c Draft: move Modifier class to gui_base_original module 2020-04-21 12:53:30 +02:00
vocx-fc
9f5e215751 Draft: move Creator class to gui_base_original module 2020-04-21 12:53:30 +02:00
vocx-fc
181c5cb60d Draft: import Part module where necessary for the tools
Also import `DraftGeomUtils` where necessary.

These modules were previously imported globaly when the base
`DraftTool` class was first called by the individual tools
through the `Creator` and `Modifier` classes.

However, since `DraftTool` was moved to a separate module,
these `Part` and `DraftGeomUtils` modules are no longer
in the `DraftTools` namespace, and therefore they
cannot be imported globally anymore.

Now the `Part` and `DraftGeomUtils` modules are imported
in the specific functions where they are actually needed.
2020-04-21 12:53:30 +02:00
vocx-fc
9b3096353c Draft: move the base DraftTool class to its own module
This is the base class of most Draft Gui Commands,
particularly those which were developed a long time ago.
It is inherited by `Creator` and `Modifier`
to set some specific options for some tools.

Newer Gui Commands do not use these classes and thus
are independent of `DraftTool`.

Nevertheless, in the future we expect to organize further
the commands so that they all derive from a few classes,
so that they all share some common properties and behaviors.
2020-04-21 12:53:30 +02:00
vocx-fc
0ba89d1662 Draft: move DraftTools utilities to another module
These small functions and utilities are placed in another
module, so they can be imported and called
by the individual Gui Command classes as necessary.

When these Gui Command classes are moved to their respective
modules, they will be able to import this auxiliary module as well.
2020-04-21 12:53:30 +02:00
vocx-fc
dd41c1a492 Draft: GuiCommandSimplest to serve as base of simple Gui Commands
This class defines the `command_name` of the command,
so that it is output to the report view, and is also recorded
in the log file.

It also stores the current document so it can be used inside the
command.

The class implements with `IsActive` method so that the command
is only active when an active document exists.

Also `GuiCommandNeedsSelection`, which subclasses the former
class. It reimplements `IsActive` in order to be available
only when there is a selection.
2020-04-21 12:53:30 +02:00
Yorik van Havre
6f2fd04518 Draft: Fixed further regressions 2020-04-21 12:46:08 +02:00
Yorik van Havre
dc742e8523 Draft: Fixed broken backwards compatibility with annotations 2020-04-21 12:20:10 +02:00
luz.paz
0c326f094f [skip ci] fix documentation typos
Found via codespell v1.17.0.dev0  
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml
```
2020-04-20 12:59:09 +02:00
carlopav
c857754460 [Draft] Further cleanup of the branch
thanks to vocx revisions
2020-04-20 12:38:06 +02:00
carlopav
81df9b76ae [Draft] Snapper cleanup
Cleanup after @vocx-fc review
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
be75f4febc [Draft] Statusbar widgets, preferences to disable draft statusba
.


.


.


.
2020-04-20 12:38:06 +02:00
carlopav
480216b25a [Draft] rough implementation of new preference dialog for interface 2020-04-20 12:38:06 +02:00
carlopav
a23224da88 [Draft] Added Draft Snap Statusbar
.
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
Yorik van Havre
4555a77663 Draft: Annotation styles editor 2020-04-17 18:51:30 +02:00
Yorik van Havre
1b887fa0f5 Draft: [WIP] Annotation styles editor 2020-04-17 17:18:52 +02:00
vocx-fc
6c890c1966 Draft: move array commands to DraftTools
Previously they were imported directly in `InitGui.py`,
now they are collected in `DraftTools.py`, so that they
are imported at the same time as other modules.

Also provide an icon so this icon appears in the menu.
2020-04-16 11:40:58 +02:00
vocx-fc
2021d0bec9 Draft: move AddPoint and DelPoint to gui_line_add_delete module
These two Gui Commands were inside `DraftTools.py`
but they were considered obsolete as they just call `Draft_Edit`.
They were completely removed in f5f43913e0 and 8fd55eb6ff.

They are restored in this commit and placed in their own module
just for historical reasons; however this module is not imported
in `DraftTools.py`.
2020-04-16 11:40:58 +02:00
vocx-fc
1a2e79ecb9 Draft: move Draft_Arc_3Points to gui_arcs module 2020-04-16 11:40:58 +02:00
vocx-fc
1f3a88f1ce Draft: move Draft_AddConstruction to gui_groups module
Also add a new icon for adding to the construction group.
2020-04-16 11:40:58 +02:00
vocx-fc
68119de02f Draft: move Draft_AutoGroup to gui_groups module 2020-04-16 11:40:58 +02:00
vocx-fc
60f3155651 Draft: move Draft_Slope to gui_lineslope module
The class name was renamed to `LineSlope` as it is fundamentally
inteded to control slopes of lines.
2020-04-16 11:40:58 +02:00
vocx-fc
8aeb33f203 Draft: move Draft_FlipDimension to gui_dimension_ops module 2020-04-16 11:40:58 +02:00
vocx-fc
ed55c6e824 Draft: move Draft_Heal to gui_heal module 2020-04-16 11:40:58 +02:00