Commit Graph

102 Commits

Author SHA1 Message Date
Yorik van Havre
4653077fce Merge pull request #7173 from Roy-043/Draft_Fix_setEdit_in_view_text.py
Draft: Fix setEdit in view_text.py
2022-07-18 10:44:31 +02:00
Roy-043
c6c67b1943 Update view_hatch.py
There is no need for `Gui.Control.closeDialog()` in `setEdit`
`Set colors` removed from the context menu.
2022-07-14 09:20:25 +02:00
Roy-043
40d952dccc Update view_facebinder.py
There is no need for `Gui.Control.closeDialog()` in `setEdit`
2022-07-14 09:17:08 +02:00
Roy-043
57699b1c25 Update view_text.py
Oops: import DraftGui instead of import Draft
2022-07-12 21:58:34 +02:00
Roy-043
e9761691ae Draft: Fix EditMode for hatch, facebinder and shapestring 2022-07-12 13:30:01 +02:00
Roy-043
7ce23ccb02 Draft: Fix setEdit in view_text.py
The setEdit function should import the Draft module to make sure draftToolBar is available.
2022-07-12 13:14:37 +02:00
marioalexis84
aa2ebb9601 Draft: Make ShapeString editable by double-click - fixes #5885
* Draft: Make ShapeString editable - fixes #5885
2022-04-08 17:47:41 +02:00
Yorik van Havre
9442668f7a Arch: Fixed IFC import/export of dimensions 2022-04-06 11:35:18 +02:00
marioalexis
79b7bfd5d0 Draft: Remove Python 2 type support 2022-03-28 18:02:23 -03:00
Matthijs Kooijman
2f05f86f6c Draft: Fix incorrect use of in operator
Looking at the surrounding code, this should be `==` rather than `in`.
The code does work as intended, because a string is always a substring
of itself, but better to fix it anyway.

Seems this was broken since this code was first introduced in commit
193339991f (Draft: clean up ViewProviderLabel class)
2022-03-20 14:45:52 +01:00
Roy
359f9d7886 Draft: Fix several translation issues 2022-01-28 14:01:42 -06:00
Roy-043
390cbd0962 Draft: fix Draft_Label viewprovider 2021-12-17 11:35:44 +01:00
Roy-043
b6381e325f Draft: fix layer handling of PointColor and PointSize
Draft_Layer did not handle PointColor and PointSize.
2021-11-28 11:52:07 +01:00
Roy-043
d019e28c08 Draft: Fix merge layers
The "Merge layer duplicates" Tree view context menu option for LayerContainers did not work.

Additionally:
- Using `openTransaction` and `commitTransaction` is required for the `merge_by_name` function but also for the `add_layer` function. Otherwise undo-redo does not work properly.
- Have replaced `translate("Draft", ...)` with `_tr(...)`.
2021-10-27 08:32:10 +02:00
Yorik van Havre
24d1a3f054 Merge pull request #5023 from marioalexis84/gui-encoding
Gui:  Harmonize encoding/decoding between view, property editor and command line.
2021-10-14 12:24:49 +02:00
Roy-043
b537a2351d Draft_Hatch_ViewProvider -> ViewProviderDraftHatch 2021-10-07 15:08:53 +02:00
Chris Hennes
5b415978ac Merge pull request #5060 from Roy-043/Draft-fix-2-svg-pattern-issues
Draft: fix 2 SVG pattern issues
2021-09-24 10:34:31 -05:00
Roy-043
fb484a2367 Draft-fix-2-svg-pattern-issues
List of patterns is now sorted A-Z.
2021-09-24 10:54:51 +02:00
marioalexis
e2b3310277 Draft: Fix Unicode and UTF-8 encoding character behavior 2021-09-23 21:21:24 -03:00
Roy-043
bb1fccbc23 Update view_base.py 2021-09-23 20:24:35 +02:00
Roy-043
114b3b4d1f Draft: fix 2 edit mode issues 2021-09-23 20:16:53 +02:00
Yorik van Havre
117328250e Merge pull request #5055 from Roy-043/Draft_fix_wpproxy_view_prop_group
Draft: fix wpproxy view properties group
2021-09-23 16:41:14 +02:00
Roy-043
cfd4704024 Draft: fix wrong type for layer transparency
Also fixed a typo.
2021-09-23 16:25:40 +02:00
Roy-043
e2e16e60dc Draft: fix wpproxy view properties group
View properties of a WP proxy should not appear in the Arch group.
2021-09-23 12:44:17 +02:00
Yorik van Havre
2bf67f0191 Draft: Introduced Hatch command + object 2021-09-06 15:27:52 +02:00
Yorik van Havre
f8f541c1e7 Draft: Use different icon if object has AutoUpdate turned off 2021-07-16 12:24:26 +02:00
Yorik van Havre
6909597f9c Merge pull request #4867 from marioalexis84/draft-label
Draft: Fix rotations and Circle marker in ViewProviderLabel - fixes #0003987
2021-06-30 10:53:07 +02:00
Yorik van Havre
fd0d28eade Draft: Implemented edit mode for Draft texts 2021-06-28 15:47:42 +02:00
marioalexis
d47e822cf2 Draft: Fix rotations and Circle marker in ViewProviderLabel - fixes #0003987 2021-06-16 04:42:07 -03:00
Roy-043
a8ad89ae7c Draft: Fix wrong tree icon for Draft_PointArray 2021-06-08 14:29:03 +02:00
Yorik van Havre
e605b2f930 Draft: Allow to set 'arch' unit override on dimensions 2021-04-29 19:51:34 +02:00
Yorik van Havre
0a88f05317 Merge pull request #4548 from chennes/lgtmDraftColorArrayCreation
[Draft] Eliminate unused loop iteration variables
2021-03-30 13:00:45 +02:00
Chris Hennes
8097a9f3f8 [Draft] Enable Transform context menu item
The "Transform" and "Set Colors..." context menu items did not work on
most Draft objects because the View Provider has a setEdit() function,
which overrides any edit action provided at a higher level (e.g. by
Part). This commit checks the mode of the edit, and if it is not zero,
behaves as though the setEdit() function does not exist, allowing Part
to provide the required context menu behavior.
2021-03-23 09:12:56 -05:00
Chris Hennes
784ee36121 [Draft] Eliminate unused loop iteration variables
When creating arrays of colors, the color information is often created
to be the same length as some array of objects. In three instances this
was achieved with a loop over that list of objects, even though the
objects themselves are never used. This commit eliminates those loops
and creates the required number of color instances directly.

Identified by LGTM.
2021-03-01 09:19:20 -06:00
Yorik van Havre
5bccc5c588 Draft: Small layer improvements
- Added 'Print Line Color' property
- Added 'Add new layer' context menu action to layers group
2020-12-15 16:43:33 +01:00
marioalexis
dcfba722f4 Draft: Fixes #0004293: Vertical dimensions can't be created in XZ and YZ working plane 2020-11-13 10:58:34 +01:00
vocx-fc
3a31a36fae Draft: use new name of the icon Part_3D_object
It is defined in the Part Workbench. Before, it was called `Tree_Part`.
2020-10-22 15:11:45 +02:00
Yorik van Havre
84692f95e1 Draft: Added pref option to set default dimension unit 2020-10-14 17:21:27 +02:00
Yorik van Havre
e595eb898b Draft: Compatibility fix 2020-10-14 17:17:56 +02:00
Yorik van Havre
674d7f25f8 Draft: Fixed patterns + added default pattern size pref option 2020-10-12 15:12:50 +02:00
Zheng, Lei
e3e7686773 Draft: add support for point link array 2020-09-21 14:01:39 +02:00
vocx-fc
513c0e9eb4 Draft: new PathTwistedArray object
It takes a `Shape` and replicates it around a path, while at the
same time adding a rotation to each copy. This can be used to create
a twisted "ribcage" from a frame-like object, which can be used
in a more complicated `Shape`, for example, a tunnel or bridge
object.
2020-09-03 12:34:16 +02:00
wmayer
2453a50aba Coverity: Structurally/Logically dead code 2020-07-20 17:34:28 +02:00
vocx-fc
ee11678a58 Draft: migrate Layer object and function to the new structure
Move `make_layer` to `draftmake`; `Layer` and `LayerContainer`
to `draftobjects`; `ViewProviderLayer` and `ViewProviderLayerContainer`
to `draftviewproviders`.

The make function and the classes are imported in `Draft.py`
to support the usage of the older `VisGroup`.
2020-07-20 14:21:15 +02:00
vocx-fc
8e9fb40fa3 Draft: add modules of draftviewproviders to the proper Doxygen group
This includes `view_array`, `view_base`, `view_bezcurve`,
`view_bspline`, `view_circulararray`, `view_clone`, `view_dimension`,
`view_draft_annotation`, `view_draftlink`, `view_facebinder`,
`view_fillet`, `view_label`, `view_orthoarray`, `view_point`,
`view_polararray`, `view_rectangle`, `view_text`, `view_wire`,
`view_wpproxy`.

These are added to the `draftviewproviders` 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
1c65c7dc92 Draft: add Doxygen strings to the packages' __init__ files
The packages are `draftfunctions`, `draftgeoutils`, `draftguitools`,
`draftmake`, `draftobjects`, `drafttaskpanels`, `drafttests`,
`draftutils`, `draftviewproviders`.
2020-07-17 13:01:45 +02:00
vocx-fc
314637e945 Draft: move grouping functions to draftutils.groups module
These functions were previously in `draftutils.utils`,
and are related to grouping objects and finding objects
inside groups. These include `get_group_names`, `ungroup`,
`get_windows`, `get_group_contents`, `get_movable_children`.
These are imported in the main `Draft.py` module, so compatibility
is retained.

Modules which use these functions are updated; these include
Gui Commands like `Move`, `Rotate`, `Scale`, `AddToGroup`,
as well as objects like `DrawingView` and `Shape2DView`,
and `ViewProviderClone`.
The code inside the `importDXF` module is also updated.

The Arch Workbench uses many of these functions
but it does so from the `Draft` namespace, so these edits
don't change the situation for these commands.
2020-07-13 14:35:38 +02:00
luz paz
ac76f16aa3 Fix Crowdin typos and various other typos/grammar [skip ci]
Found via codespell v2.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-07-12 11:42:27 +02:00
vocx-fc
9b8b20dd8a Draft: remove touch status in viewproviders of the Dimension objects
Remove the `touch` status, as the modifications only affect
the viewproviders, not the real properties.
2020-07-10 12:29:30 +02:00
vocx-fc
f24c97be53 Draft: clean up ViewProviderAngularDimension class
This class is also derived on `ViewProviderDimensionBase`.
It is used to measure the angle between two straight lines.

Various improvements in style, PEP8, spacing, docstrings.
In particular use more readable variable names.

The `updateData` method is modified to return immediately
if the `arc` attribute does not exist. This is better
to reduce the level of indentation of the code.
2020-07-10 12:29:30 +02:00