Commit Graph

49 Commits

Author SHA1 Message Date
Uwe
cbd0140dcd [TD] Task*, part 2/2: remove unused includes
- also some sorting
- also take care of PreCompiled.h
2022-12-07 19:49:05 +01:00
Uwe
16abb8d548 [TD] DrawUtil: remove unused includes
- also sort includes
- also move a definition to it
- also adapt two Gui files accordingly
2022-10-08 03:35:59 +02:00
wandererfan
acf17905ed [TD]CI clang warnings 2022-09-05 17:48:38 -04:00
berniev
da9ebc572f Mod: redundant void 2 2022-08-08 10:27:50 +02:00
Benjamin Bræstrup Sayoc
86dfd0a862 [TechDraw] Simplify code getting default line weights 2022-08-02 16:13:01 -04:00
Uwe
31bc9f3913 [TD] remove some more superfluous nullptr checks 2022-07-20 02:53:48 +02:00
Uwe
af18a97913 [TD] Gui: remove more superfluous nullptr checks 2022-07-19 03:40:32 +02:00
Benjamin Bræstrup Sayoc
1ae137aeba [TechDraw] Improve readability of TaskCenterLine.cpp 2022-07-15 11:31:11 -04:00
Wanderer Fan
584af812ad [TD]fix extra undo on TaskCenterLine cancel 2022-05-11 09:57:53 -04:00
wmayer
fd8719c85c TD: [skip ci] activate PCH of TechDraw (Gui) and use forward declarations
For MSVC this reduces compile time by ~20%
2022-03-25 13:54:47 +01:00
Uwe
2e7cb2c3fb [TD] remove a single-header file 2022-03-25 04:11:53 +01:00
wmayer
a99be14233 TD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Wanderer Fan
cb280afbc4 [TD]remove redundant edits from 9 Task dialogs 2022-01-22 14:51:20 -05:00
Wanderer Fan
e91cc8e329 [TD] avoid memory leaks by using shared_ptr
TD geometry objects are sometimes double deleted.  This
change uses shared_ptr instead of raw pointers to manage
deletions.
2022-01-07 13:34:20 -05:00
luz paz
eab17ddff5 Fix various typos 2021-07-31 09:46:50 +02:00
wmayer
07c65c65d6 TD: fix -Wunused-private-field 2021-06-12 11:00:53 +02:00
donovaly
b981f9056c [TD] fix centerline crashes and bugs
the PR fixes the following things:
- change the way centerlines between 2 lines are calculated. The current implementation leads to many bugs and even crashes (e.g. when the 2 selected lines are parallel ones of a square). There are different forum threads from the last 1.5 years.
The new endpoint line sorting is the one described here: https://forum.freecadweb.org/viewtopic.php?f=35&start=20&t=44255&sid=989a668890f954c13ef81e4a04ee6912#p501179

- as consequence the erroneous and misleading line end flipping can go and is removed (only used internally)

- when creating a new centerline, you see it immediately

- when creating a new or editing an existing centerline and press Cancel, the creation/editing is aborted

- fix crash when the 2 selected lines are bot horizontal and one tries to create a vertical centerline

- fix crash when changing the orientation  of an existing centerline and the result would be invalid

- cleanup the code a bit
2021-05-15 05:21:29 +02:00
Alexander Golubev
33cca2e6c6 TD: fix center line style settings
forum thread: https://forum.freecadweb.org/viewtopic.php?f=35&t=57783
2021-04-17 11:39:13 +02:00
luz paz
373e3a68aa [TD] icon uniformity for ActiveView and FaceCenterLine commands
Renamed SVGs, saved as plain svg, updated appropriate areas in the source code
2021-04-05 14:41:30 +02:00
donovaly
b5f57ed2f0 [TD] make pointers to the UI std::unique_ptr
as noted in https://github.com/FreeCAD/FreeCAD/pull/4271#discussion_r554673632
the pointer to the UI should be a unique pointer.

This PR does this for all TD dialogs that don't already use a unique_ptr.
2021-01-19 19:24:27 +01:00
donovaly
a1915d313a [TD] make LineGroup selectable
At the moment one has to specify the LineGroup as string. But one doesn't know what groups exist. So one has to check the Wiki, learn there where the groups are defined and then open the definition file with a text editor.

This PR simplifies this by reading the existing groups out of the definition file and fill the combobox accordingly.
It also give the user info what the selected LineGroup defines via the tooltip.

A nice side effect is that no typos can occur since you don't have to enter the LineGroup name as text.
2020-12-03 17:24:49 +01:00
luz paz
2befcd9502 TD: Issue #0004473: Expose openCommand() to translation
Continuing the work to expose the undo/redo functionality to translation. This commit does so for the TechDraw Wb.  
Ticket: https://tracker.freecadweb.org/view.php?id=4473
2020-12-01 14:53:35 +01:00
luz paz
a3cb87b117 TechDraw: Header uniformity and whitespace fixes 2020-11-14 16:59:51 +01:00
wmayer
b25dee58d5 Coverity: Uninitialized scalar/pointer field 2020-07-20 17:34:30 +02:00
wmayer
421f6c52cb Coverity: Dereference after null check 2020-07-20 17:34:25 +02:00
wmayer
e9bc970c28 PVS: V522 There might be dereferencing of a potential null pointer 2020-07-18 10:59:27 +02:00
wandererfan
add17980b3 [TD]Eliminate replace fcns for Cosmetic objs 2020-05-16 07:42:45 -04:00
wandererfan
e80c576241 [TD]Centralize preference getters 2020-04-24 11:13:49 -04:00
wandererfan
1c5b2c8e27 [TD]fix crash on bad centerline selection 2020-04-17 10:11:24 -04:00
donovaly
9064768a5c [TD] TaskCenterLine add missing unit initialization
next try because PR #3275 cannot be merged.
2020-03-28 20:53:19 -04:00
donovaly
28e40f8dc5 [TD] Centerline dialog refurbish
- group the radio buttons
- make edit dialog apply immediately
2020-03-23 09:24:25 -04:00
wandererfan
30a0047cd4 [TD]Fix handling of CL flip parameter 2020-03-21 09:40:22 -04:00
donovaly
f9c9d1ee14 [TD] cleanup and fixes for Centerlines
- merge the flip Ends option to the main dialog
- use a QuantitySpinBox with angular unit for the angle
- store the state of the flipping correctly
- cleanup UI of dialog to avoid vertical whitespace
2020-03-19 09:33:31 -04:00
donovaly
197efb8b28 [TD] improve dialogs
- DlgPrefsTechDraw3.ui: improve wording as discussed
- TaskCL2Lines.ui: morph option to QCheckBox
- TaskCenterLine.cpp: the Aligned option is not available for face mode
- TaskCenterLine.ui: use same default line style as in prefs
- TaskCenterLine.ui: correct tooltip for align option
2020-03-18 09:52:42 -04:00
wandererfan
10d802698b [TD]fix bad preference keys
- GeomHatch color, centerline color, ortho balloon
  filled triangle end
2020-03-17 08:45:26 -04:00
wandererfan
a04d0f2574 [TD]Py routines for CenterLines 2019-12-16 20:36:10 -05:00
wandererfan
517b11ee3b [TD]Fix crash on same end points 2019-07-19 20:17:20 -04:00
wandererfan
3aa6fa19c6 [TD]Py functions for CenterLines and formatting 2019-07-19 20:17:20 -04:00
wandererfan
e406b2f3e6 [TD]Remove NoLine option from dialogs 2019-07-18 08:53:38 -04:00
luz.paz
ff1a7fd0a8 Fix typos
Found via `codespell -q 3 -I ../fc-word-whitelist.txt -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`
2019-07-16 11:21:52 -03:00
wandererfan
941968b37c [TD]Edge and Vertex center lines 2019-07-15 12:36:48 -04:00
wandererfan
3d2edd0f7e [TD]Add line appearance editor 2019-07-15 12:36:48 -04:00
wandererfan
11d8aaed61 [TD]Add CenterLine edit function 2019-07-15 12:36:48 -04:00
wandererfan
39e556fb3f [TD] Add Centerline Shift/Rotate 2019-07-15 12:36:48 -04:00
wandererfan
5970e91ef2 [TD]Py Cosmetic Vertex, Line, Circle Arc 2019-07-15 12:36:48 -04:00
wandererfan
3e0452417b Cosmetic CL for Section and Detail 2019-06-06 19:58:15 -04:00
wandererfan
f25826bba3 Change Face centerline command name and icon 2019-06-06 19:58:15 -04:00
wandererfan
e0bf0b966c Handle multiple face selection 2019-06-06 19:58:15 -04:00
wandererfan
656e1654ff Initial working version Face Centerline 2019-06-06 19:58:15 -04:00