Commit Graph

134 Commits

Author SHA1 Message Date
berniev
da9ebc572f Mod: redundant void 2 2022-08-08 10:27:50 +02:00
berniev
b796a0d376 Mod: use empty 2022-08-06 19:30:13 +02:00
Uwe
7ab531c51a [TD] last part of removal of superfluous nullptr checks 2022-07-20 12:17:16 +02:00
Uwe
40d8ebb372 [TD] remove some more superfluous nullptr checks 2022-07-20 11:54:28 +02:00
Uwe
31bc9f3913 [TD] remove some more superfluous nullptr checks 2022-07-20 02:53:48 +02:00
Uwe
2e5e4dced8 [TD] Gui: remove some superfluous nullptr checks 2022-07-19 02:49:46 +02:00
Wanderer Fan
b6c20202cd [TD]adjustable extension line gap 2022-07-04 20:43:49 -04:00
Wanderer Fan
56d289997c [TD]fix Dimension/Balloon movement 2022-06-02 16:33:25 -04:00
Wanderer Fan
15917cd60f [TD]fix artifact in PDF export 2022-04-07 08:46:11 -04:00
wmayer
a99be14233 TD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Wanderer Fan
244caf39cd [TD]fix unit display to standards 2022-03-13 19:04:42 -04:00
Wanderer Fan
4da3c21dcf [TD]Allow override of dimension line angles 2022-01-27 09:42:49 -05:00
wmayer
e728c3590e TD: [skip ci] Fix coverity warning
Coverity warnings fixed:

CID 316559 (#1 of 1): Uninitialized scalar variable (UNINIT)
3. uninit_use_in_call: Using uninitialized value we. Field we.idx is uninitialized when calling push_back

CID 316549 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
4. uninit_member: Non-static class member pageheight is not initialized in this constructor nor in any functions that it calls.

CID 186161 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
2. uninit_member: Non-static class member parent is not initialized in this constructor nor in any functions that it calls.

CID 305170 (#1 of 1): Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking this->m_baseFeat suggests that it may be null, but it has already been dereferenced on all paths leading to the check.

CID 186152 (#2 of 2): Uninitialized pointer field (UNINIT_CTOR)
3. uninit_member: Non-static class member m_mdi is not initialized in this constructor nor in any functions that it calls.

CID 192588 (#1 of 1): Same on both sides (CONSTANT_EXPRESSION_RESULT)
pointless_expression
2021-02-21 16:30:30 +01:00
wmayer
a82a103cb3 TD: fix undo/redo for dimension objects
* do not emit dragFinished() signal inside mousePressEvent as nothing has been done. This avoids to create an empty transaction and doesn't touch the document
* inside mouseReleaseEvent() check if the mouse has been moved and only if yes emit the signal
* improve error handling in mouseDoubleClickEvent
* in mouseDoubleClickEvent start to edit the view provider
2021-02-14 19:03:19 +01:00
Aapo
4ea0784341 [TD] Dimensions: donovaly's minor fixes for TheoreticalExact dimensions. 2021-01-31 15:17:46 +01:00
Aapo
e802179cf4 [TD] Improve arbitrary tolerance and unit handling for Equal Tolerances. 2021-01-31 15:17:46 +01:00
Aapo
a2f060e36e [TD] Fix degree sign processing for equilateral angular plusminus dimensions. 2021-01-31 15:17:46 +01:00
donovaly
fc91b251ee [TD] add dialog to modify some dimension settings
also fix issue that tolerance could be set despite theoretically exact is true under some circumstances

also some wording improvements

also a minor fix to use 0.0 instead of DBL_MIN
2021-01-15 05:21:49 +01:00
donovaly
2b0a13f71d [TD] don't allow tolerances for exact values
as discussed here: https://forum.freecadweb.org/viewtopic.php?f=35&t=54218
when a value is theoretically exact it must not have a tolerance

This PR
* fixes this
* also fixes the bug that OverTolerance must not be negative if the tolerances are equal
2021-01-13 04:05:31 +01:00
donovaly
714a716575 [TD] handle equal tolerances correctly
the common rule is that if a dimension has equal over- and undertolerance, they are output on the same line as the dimension concatenated using the ± character.

This PR does this.

Note that this is not just cosmetics, it is even standardized in the GD&T norms.

also:
* use one format specifier for tolerances since the norms don't allow a different format for the over- and the undertolerance
* some code optimizations like a self-explaining function name, remove unnecessary/outdated comments
2021-01-08 15:14:37 +01:00
Aapo
dadac36234 [TD] GQIViedDimension.cpp, GQCustomText.cpp - Fix Dimension label unit positioning bug and too tight bounding rectangle. 2020-12-03 21:31:01 +01:00
aapo-aapo
e71b7ac879 @aapo-aapo @chennes [TD] Suggested minor improvements for DrawViewDimension.cpp and QGIViewDimension.cpp in Pull request review.
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2020-12-02 16:38:21 +01:00
Aapo
3f623576d5 [TD] Add tolerance format specifiers and arbitrary tolerances. 2020-12-02 16:38:21 +01:00
Aapo
768a2b1f11 [TD] Make tolerance labels use the same formatValue() conversion as dimension labels. Support MultiValueSchemas for tolerances, too. 2020-12-02 16:38:21 +01:00
Aapo
c695b4009b [TD] Refactor DrawViewDimension getFormatedValue() into two functions. 2020-12-02 16:38:21 +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
Aapo
4e06414552 [TD] Add comments and more transparent tolerance position adjustment calculation. 2020-12-01 14:37:39 +01:00
Aapo
f2e91ec488 [TD] Make dimension number graphical layout more compact by making boundingRect() tighter for dimension number labels. 2020-12-01 14:37:39 +01:00
wmayer
9fd5769f07 TechDraw: [skip ci] fix several gcc/clang warnings
-Wunused-private-field
-Wmaybe-uninitialized
-Wunused-parameter
2020-09-11 15:10:58 +02:00
wandererfan
5d58c2c711 [TD]remove extra space in Angular Dims 2020-08-29 11:13:35 -04:00
wandererfan
cc81f791da [TD]change Angle Dim tolerance format 2020-08-22 08:56:57 -04:00
wandererfan
980ecc87a3 [TD]Dim blocks selection of geometry 2020-07-28 15:09:40 -04:00
wandererfan
9dac347fc7 [TD]fix Dim selection fails to clear prev selection 2020-07-26 19:45:49 -04:00
wmayer
b25dee58d5 Coverity: Uninitialized scalar/pointer field 2020-07-20 17:34:30 +02:00
wmayer
da6b379566 fixes #0004318: Compilation fails with Qt 5.15 beta with QPainterPath errors [skip ci] 2020-07-02 13:19:43 +02:00
wandererfan
e80c576241 [TD]Centralize preference getters 2020-04-24 11:13:49 -04:00
donovaly
6fa80d8cbf [TD] fix order of arrow heads
see https://forum.freecadweb.org/viewtopic.php?f=35&t=44334#p378675
2020-03-21 09:44:07 -04:00
Tobias Ellinghaus
85c9376fef Fix label of angular dimensions
According to ISO 129-1 labels of angular dimensions may never be upside
down (that is also true for other labels but not relevant for this
commit).
2020-03-13 09:02:37 -04:00
donovaly
a219f92711 [TD] fix arrow end None for dimensions
This was not merged from my PR to PR #3153

- also uniform the combobox appearance in the preferences
2020-03-13 09:01:06 -04:00
wandererfan
fb2454dde7 [TD]fix crash on Dim delete
- adjust index/cache options to avoid "dirty" screen
  region errors.
- may be masking missing "prepareGeometryChange"
2020-03-06 13:56:38 -05:00
wandererfan
e0eda0de58 [TD]expose dimension arrow position to Python 2020-03-02 08:37:19 -05:00
WandererFan
49e4e45ff3 [TD]fix compile error on Win re M_PI 2020-01-10 18:04:41 -05:00
wandererfan
b7190a8b50 [TD]refix Dim select area problem 2020-01-08 15:07:28 -05:00
wandererfan
7e3197abe0 [TD]fix Dimension selection issues 2019-12-31 17:28:41 -05:00
wandererfan
dcc2790834 [TD]fix potential nullptr while restoring 2019-12-30 18:20:48 -05:00
wandererfan
6a31795600 [TD]improve presentation of tolerance text 2019-12-18 07:01:46 -05:00
wandererfan
186d52ffd4 [TD]fix dim text for multi value schemas 2019-12-05 07:10:08 -05:00
wandererfan
5021f3777b [TD]Fix Dimension prefix/suffix 2019-10-20 15:36:59 -04:00
wandererfan
a1de871e93 [TD]Fix duplicate Arbitrary dim text 2019-10-18 09:13:06 -04:00
wmayer
9ba5d3505c fix -Winconsistent-missing-override -Wunused-variable 2019-10-13 14:29:52 +02:00