Commit Graph

1482 Commits

Author SHA1 Message Date
wmayer
20bcce1544 TD: [skip ci] implement DrawView::recompute to handle all OCC exception types 2021-02-25 12:39:50 +01:00
wmayer
17a848dfe1 TD: [skip ci] explicitly nullify geometryObject in DrawViewPart::partExec to avoid to leave it a dangling pointer in case makeGeometryForShape raises an exception 2021-02-25 11:34:29 +01:00
Aapo
51194d67d5 [TD] Hotfix for Dimension label Arbitrary value regression in DrawViewDimension.cpp 2021-02-25 10:28:42 +01:00
Yorik van Havre
5ba28fa7ff Merged crowdin translations 2021-02-24 18:07:59 +01:00
donovaly
ab3464b0f6 [TD] fix balloon dragging
Fixes bug that dragging while pressing CTRL did not work anymore, see https://forum.freecadweb.org/viewtopic.php?f=35&t=55863
2021-02-22 02:17:05 +01: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
vosk
542bf23cb0 [TD] - Fix geometry object leaking on every exec 2021-02-19 16:50:56 +01:00
Yorik van Havre
08e226df25 Merge pull request #4456 from donovaly/TD-balloon-drag
[0.19] [TD] fix dragging of balloons
2021-02-18 15:48:58 +01:00
donovaly
190ddd941e QGIViewBalloon.cpp: a fix as suggested 2021-02-18 01:41:23 +01:00
Chris Hennes
dc0d4e4a02 [TD] Fix error in editable status of DOCUMENT_TYPE
All of the TechDraw ISO7200_Pep templates so that the DOCUMENT_TYPE area is
fully editable, allowing the user to overwrite the default contents entirely
instead of just adding to it.
2021-02-17 16:01:44 +01:00
donovaly
da4f6cecc8 QGIViewBalloon.cpp: code simplification 2021-02-16 01:51:43 +01:00
donovaly
1061c0ed85 [TD] fix dragging of balloons
as reported in https://forum.freecadweb.org/viewtopic.php?f=10&t=55109&start=30#p478147
dragging a balloon pollutes the undo steps destroying working with undo and drawings.
2021-02-15 22:28:13 +01:00
wmayer
008e97b929 TD: fix undo/redo for balloon objects
* inside mouseReleaseEvent() check if the mouse has been moved and only if yes emit the dragFinished() signal
* improve error handling in mouseDoubleClickEvent
* in mouseDoubleClickEvent start to edit the view provider
2021-02-14 19:30:06 +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
wmayer
66417b3ce1 TD: [skip ci] use setAutoCloseOnTransactionChange for balloon and dimension task dialog 2021-02-12 17:43:31 +01:00
wmayer
d4e8a5a384 TechDraw: [skip ci] avoid to trigger a slot in constructor of TaskBalloon 2021-02-12 16:55:39 +01:00
wmayer
3288c02eba TechDraw: fixes for dimension feature:
* reimplement ViewProviderDimension::setupContextMenu() to show menu item to start editing it
* fix TaskDimension::accept() and TaskDimension::reject()
2021-02-12 15:55:26 +01:00
wmayer
bb0d75b6cc TechDraw: [skip] fixes for balloon feature:
* reimplement ViewProviderBalloon::setupContextMenu() to show item to start editing it
+ fix TaskBalloon::accept() and TaskBalloon::reject()
2021-02-12 15:36:21 +01:00
Yorik van Havre
84b8282f48 Updated ts files 2021-02-12 14:47:37 +01:00
luz paz
f45f218885 TechDraw: expose TechDraw_Decorate function tooltip to translation
Forum thread https://forum.freecadweb.org/viewtopic.php?f=34&t=55382
2021-02-09 20:09:36 +01:00
luz paz
bcf46a3351 TechDraw: Expose strings in Workbench.cpp to translators
Forum thread: https://forum.freecadweb.org/viewtopic.php?f=34&t=55382
2021-02-09 20:09:36 +01:00
Yorik van Havre
bcb5c8786f merged crowdin translations 2021-02-09 16:12:18 +01:00
Yorik van Havre
298004a39c Updated master TS files 2021-02-08 16:35:41 +01:00
Aapo
9318c4c1f2 [TD] ShapeExtractor.cpp: Fix linked View source bug, link targets were translated but not scaled in TD. 2021-02-05 22:41:09 +01:00
Aapo
75dee2ff7d [TD] Fix XSource handling of sub-objects of links to another document(s) in TD Views. 2021-02-05 19:19:24 +01:00
donovaly
21dc72ed10 [TD] make more pointers to the UI std::unique_ptr
addendum to PR #4293

(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 remaining TD dialogs that don't already use a unique_ptr.)
2021-02-05 13:24:21 +01:00
donovaly
400b25c0d0 [TD] fix color change for dimensions
This PR fixes issue C reported here: https://forum.freecadweb.org/viewtopic.php?f=35&t=55008#p472939
- the changed color must also be applied to the dimension line and arrows
2021-02-03 14:11:44 +01:00
Yorik van Havre
078160ea70 TechDraw: Exposed GeomHatch functionality to Python in TechDraw.makeGeomHatch() 2021-02-02 17:49:44 +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
660710c26e [TD] Add under- and overtolerances for Dimension Task layout, fixes for Dimension tolerance refresh and behavior. 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
Aapo
d26b6542ca [TD] Fix regression in Dimensions: Setting arbitrary under tolerance was somehow lost. 2021-01-31 15:17:46 +01:00
Aapo
92846ad0f1 [TD] Avoid changing default open/save dir to templateDir when opening a Page template. 2021-01-28 14:54:59 +01:00
Yorik van Havre
c6088faca6 Merge pull request #4309 from donovaly/TD-Arch-pages
[TD] add Arch paper size templates
2021-01-25 13:13:59 +01:00
Yorik van Havre
ccf392cd2c Merge pull request #4313 from donovaly/TD-center-marks
[TD] show by default center marks
2021-01-25 12:15:26 +01:00
Chris Hennes
f440fa9dbd Add the standard-defined "xml" namespace if it is not specified
The XML standard stipulates:
The prefix xml is by definition bound to the namespace name http://www.w3.org/XML/1998/namespace. It MAY, but need not, be declared, and MUST NOT be bound to any other namespace name. Other prefixes MUST NOT be bound to this namespace name, and it MUST NOT be declared as the default namespace.

If the document does not explicitly include this namespace, it is added. This prevents errors due to the use of the namespace in some imported SVG files. In debug builds those errors emit warning messages, and in Windows debug builds those errors cause an abort() to be called.
2021-01-24 22:35:27 -06:00
donovaly
d8797ba0cb [TD] show by default center marks
as requested here: https://forum.freecadweb.org/viewtopic.php?f=35&t=54718#p470334
2021-01-25 04:29:45 +01:00
donovaly
2d2041e98c [TD] add Arch paper size Templates
thanks to the recently merged PR #4292 one can use custom page sizes such as the templates in https://wiki.freecadweb.org/Arch_templates

This PR add them to be directly provided by FC.
2021-01-25 02:58:41 +01:00
Yorik van Havre
c06cd3c546 Merge pull request #4291 from aapo-aapo/TD-US-MultiValueSchema-fix
[TD] Fix Dimension unit printing problem for US building units …
2021-01-21 13:32:48 +01:00
Yorik van Havre
d7038409bf Merge pull request #4292 from aapo-aapo/TD-MDIViewPage-papersizes
[TD] MDIViewPage: Add support for Qt5 automatic paper size handling …
2021-01-21 13:21:56 +01: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
Aapo
4d40ab0f49 [TD] MDIViewPage: Support printing/exporting arbitrary custom paper sizes for Qt5. 2021-01-19 11:03:24 +02:00
Aapo
d79fd9d6a9 [TD] MDIViewPage: Add support for Qt5 automatic paper size handling with many new paper sizes possible. 2021-01-19 00:49:57 +02:00
Aapo
1c02a2ae9f [TD] Fix Dimension unit printing problem for US building units and other multivalueschema. 2021-01-18 21:52:35 +02: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
Yorik van Havre
254c1bceef Merge pull request #4263 from donovaly/TD-tweaks
[TD] preferences entry and tolerance step size
2021-01-11 12:21:40 +01:00
donovaly
0c7c330fe1 [TD] show balloon dialog on double-clicking
when adding GD&T statements as described in https://wiki.freecadweb.org/TechDraw_Geometric_dimensioning_and_tolerancing
You will quickly get a lot of balloons and it is then very tiring to be forced to first select a balloon with a single-click in the drawing, then go to the model tree and there double-click to get the dialog.

This PR also removes unused includes from the dialog code.
2021-01-11 03:02:35 +01:00
donovaly
e8d76d49bf [TD] some fixes
- the setting "Standard and Style" only affects new dimensions, thus it must be italic

- fix bug that the Property 'LockPosition' appears for dimensions -> this is an option for views and thus must be hidden for dimensions

- since tolerances are in the vast majority fractions of a millimeter/inch, set its stepsize to 0.1
(I hope I did it right in handleChangedPropertyType.)

- fix inconsistent newlines in TaskBalloon.h

- improve wording for a heading
2021-01-10 00:29:34 +01:00