Commit Graph

134 Commits

Author SHA1 Message Date
mosfet80
9c02cd0014 TechDraw: Remove unused functions (#21483)
* removed unused functions

remode update

* removed unused function

removed     CreateTechDrawCommandsDims()
clean code

* removed unused function

removed     CreateTechDrawCommandsDims()
clean code

* TD: Restore CreateTechDrawCommandsDims() function

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-09-02 23:45:40 -05:00
wmayer
cd31d0e698 TD: Fix crash on selecting 3D edge for dimension
Unlike in the bug description of issue 19654 the user doesn't have
to preselect an edge in the 3D view but first start the dimension
command and then select an edge.

This commit adds some security checks to TechDrawHandler::quit(),
TechDrawHandler::getPage() and TDHandlerDimension::onSelectionChanged()
to be on the safe side that no null pointers are dereferenced.

But the ultimative fix for this whole problem is to change
activateHandler() and immediately delete the passed TechDrawHandler if
it fails to find the appropriate QGVPage. This is needed as otherwise
the handler behaves like a ghost object that affects the selection
mechanism and disallows to select anything in the 3D view or the tree
view.

Fixes issue 19654
2025-09-01 14:11:51 +02:00
theo-vt
a94dc1463d TechDraw: add transactions to multiple commands (#22795)
* TechDraw: add transactions to multiple commands

* Feed each 'Create Dimension' option to the translation macro

* Call fixSceneDependencies when re-adding dimensions so that it shows up at the right place
2025-08-18 11:46:15 -04:00
Ryan Kembrey
75b2ef67fc TechDraw: Update UI strings for consistency
Closes: #22143
2025-08-04 20:26:04 +02:00
Chris Hennes
38a177b1bf TD: Fix multiplication result converted to larger type 2025-07-21 23:40:56 -05:00
bofdahof
998f4e4d45 Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Kacper Donat
216166d853 TechDraw: Replace dynamic_cast with qobject_cast 2025-04-26 14:23:25 +02:00
Kacper Donat
d9d518f905 TechDraw: Use freecad_cast whenever possible 2025-04-26 14:23:25 +02:00
Benjamin Nauck
a34c0cb093 TechDraw: Potential fix for snap builds, specify type.. again (#20831)
* TechDraw: Potential fix for snap builds, specify type

* Techdraw: Fix more toDegrees-issues
2025-04-17 00:19:26 +02:00
captain0xff
08381b1d18 remove some code setting pixel density ratio for pixmaps
update
2025-04-03 19:55:27 +05:30
Benjamin Nauck
d0320b494d TechDraw: Add #include <limits> where used 2025-03-31 23:53:03 +02:00
Benjamin Nauck
bfdaa9aab2 Techdraw: Use std::numeric_limits and std::numbers instead of defines 2025-03-29 13:32:39 +01:00
Benjamin Bræstrup Sayoc
738608db07 Remove magic number and hard type enums in DimensionValidator.h
- Remove currently present magic numbers
- Hard type enums, so magic numbers can no longer be introduced. We don't want people to introduce magic numbers.
2025-03-02 17:14:24 +01:00
Benjamin Bræstrup Sayoc
b5885936d3 TechDraw: extract QGIDatumLabel 2025-02-25 14:25:31 +00:00
Benjamin Bræstrup Sayoc
63d9806b86 Remove magic number and hard type enums in Geometry.h
- Remove currently present magic numbers
- Hard type enums, so magic numbers can no longer be introduced. We don't want people to introduce magic numbers.
2025-02-17 12:16:49 -05:00
Benjamin Bræstrup Sayoc
835905f76e TechDraw: Use QStringLiteral 2025-02-10 18:32:44 +01:00
tritao
65466d580b Gui: Reorganize the selection files into a top Selection folder. 2025-02-03 17:56:57 +01:00
Benjamin Bræstrup Sayoc
36f2aa6152 [TechDraw] Translations and grammer (#16301)
Co-authored-by: WandererFan <WandererFan@gmail.com>
2024-12-02 12:27:39 -05:00
Max Wilfinger
616028efe5 Merge pull request #15957 from hasecilu/fix/capitalization
TechDraw: Fix capitalization of 2D and 3D
2024-11-15 18:37:47 +01:00
wandererfan
528c2a0a17 [TD]fix parallel edge test (fix #16851)
- missing normalization before test
2024-10-07 17:34:11 +02:00
hasecilu
4cae5bb883 TechDraw: Fix capitalization of 2D and 3D 2024-09-14 12:07:50 -06:00
PaddleStroke
ef4d79a383 TechDraw: add isDimCmdActive to remove code duplicates. 2024-08-08 10:23:07 -04:00
PaddleStroke
55588b9035 TechDraw: Fix Dimension tool being active at wrong times 2024-08-08 10:23:07 -04:00
Max Wilfinger
7d21d9edb8 Fix source string typos mentioned on Crowdin (#15261) 2024-07-08 17:18:31 -05:00
PaddleStroke
50228e5071 TechDraw: Fix 14038 and Refactor CommandCreateDims by adding execDim to reduce code duplicity. 2024-07-08 12:05:15 -04:00
wandererfan
6b84b65841 [TD]fix segfault on confused selection
- failure in DrawDimHelper when both 2d & 3d geom selected
2024-06-16 13:15:19 -04:00
PaddleStroke
8acc6c534a TechDraw: Smart dimension, fix initial selection by disabling Auto::Transaction 2024-06-03 11:57:33 -04:00
PaddleStroke
65b6f349bb TechDraw: Smart dimension: fix D shortcut that was wrongly assigned to radius. 2024-06-03 11:57:33 -04:00
PaddleStroke
61712c8a6b TechDraw: Smart dimension : fix radius/diameter command names 2024-06-03 11:57:33 -04:00
wandererfan
502207db31 [TD]Fix selection issue in DimensionRepair 2024-05-24 18:42:58 -04:00
Michael K Johnson
42768a44a5 Fix typo in TechDraw tooltip 2024-05-20 11:57:40 -05:00
PaddleStroke
3ed366b629 TechDraw: Smart Dimension tool : Integrate the 'chamfer' tool. 2024-05-13 15:03:43 +02:00
PaddleStroke
1aee2772f0 Techdraw: Smart Dimension: Fixes and simplifies code 2024-05-13 15:03:37 +02:00
PaddleStroke
e33c983614 TechDraw: Implement 'Area' dimension. 2024-05-06 18:42:28 +02:00
PaddleStroke
337cd39244 TechDraw: Improve Arc Length dimension tool so that it can do any edge length: arc of ellipse, bspline. 2024-05-06 18:40:46 +02:00
PaddleStroke
05b6e9e2ee TechDraw: Smart Dimension tool : Integrate chain and coord dimensions. 2024-05-06 18:40:46 +02:00
PaddleStroke
3bd3c953de TechDraw: Smart Dimension tool : Integrate extent dimensions. 2024-05-06 18:40:46 +02:00
PaddleStroke
7f67c4f30d TechDraw: Implement smart dimension tool. 2024-05-06 18:40:46 +02:00
wandererfan
fe89dbb030 [TD]remove obsolete LinkDimension from toolbar 2024-03-13 13:54:59 -04:00
wandererfan
2e5d902d1a [TD]Dimension validation improvements 2024-01-16 20:07:30 -05:00
Tomas Pavlicek
8d51d78ce7 [TechDraw] Tree view update refactoring (#11815) 2023-12-23 08:06:58 -05:00
wandererfan
305e678c88 [TD]fix vertex-edge dimension 2023-12-20 19:33:00 -05:00
wandererfan
414e06d54d [TD]apply translateLabel after all addObject calls 2023-08-17 19:23:29 -04:00
wandererfan
72df799770 [TD]apply tester feedback on DimRepair 2023-01-18 17:48:22 -05:00
wandererfan
79c5f417ab [TD]Ungroup dimension commands 2023-01-18 17:48:22 -05:00
Uwe
f8db7e9187 [TD] remove unused headers (#8155)
* [TD] remove unused headers

- also some sorting
- also improve readability by not using an abbreviation (we consistently don't abbreviate class names)
2023-01-09 14:55:22 +01:00
wandererfan
17554e29f1 [TD]fix issues reported by 3d dimension testers
- correct interpretation of True vs Projected

- handle long subelement names in references

- fix "too small" value condition

- better error messages for bad dimension geometry
2023-01-07 16:32:03 -05:00
wandererfan
1b547dff72 [TD]Refactor Dimensions for 3d upgrade
- separate validation, geometry and reference handling into
  individual files
- improve 3d reference geometry handling
- eliminate duplicate dim creation code

- add Dimension reference repair dialog

- Refactor formatting out of DrawViewDimension

- move dimension repaint control to ViewProvider
2023-01-07 16:32:03 -05:00
Uwe
e29d1d0332 [TD] Gui, A*-C*: remove unused includes
- also sort includes
- also an addition to precompiled header
- TaskCenterLine: remove unused code that interferes with used code with the same name
2022-10-09 03:34:53 +02:00
wandererfan
20f5db1ad1 [TD]fix extent dimension 2022-09-09 13:02:08 -04:00