Commit Graph

1476 Commits

Author SHA1 Message Date
vosk
100a7ade4c [TD] - Fix geometry object leaking on every exec 2021-02-19 16:50:56 +01:00
Yorik van Havre
3122859464 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
966540aa3a QGIViewBalloon.cpp: a fix as suggested 2021-02-18 01:41:23 +01:00
Chris Hennes
2f98337403 [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
038e35c002 QGIViewBalloon.cpp: code simplification 2021-02-16 01:51:43 +01:00
donovaly
5932bbd6a6 [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
a79e9bb609 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
9b145fc830 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
a800920791 TD: [skip ci] use setAutoCloseOnTransactionChange for balloon and dimension task dialog 2021-02-12 17:43:31 +01:00
wmayer
0b0bd8b806 TechDraw: [skip ci] avoid to trigger a slot in constructor of TaskBalloon 2021-02-12 16:55:39 +01:00
wmayer
2824acedda 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
77c6eb91e3 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
0de8cceb53 Updated ts files 2021-02-12 14:47:37 +01:00
luz paz
7eabc1fce1 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
2ce2759350 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
97379e035a merged crowdin translations 2021-02-09 16:12:18 +01:00
Yorik van Havre
5d18625677 Updated master TS files 2021-02-08 16:35:41 +01:00
Aapo
f0992574bd [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
462dc33d48 [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
6f25fa6bb8 [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
8a3cc86d0c [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
e947b9bb3b TechDraw: Exposed GeomHatch functionality to Python in TechDraw.makeGeomHatch() 2021-02-02 17:49:44 +01:00
Aapo
9f49b122f4 [TD] Dimensions: donovaly's minor fixes for TheoreticalExact dimensions. 2021-01-31 15:17:46 +01:00
Aapo
f362930664 [TD] Improve arbitrary tolerance and unit handling for Equal Tolerances. 2021-01-31 15:17:46 +01:00
Aapo
dbef970697 [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
5350a2c3d0 [TD] Fix degree sign processing for equilateral angular plusminus dimensions. 2021-01-31 15:17:46 +01:00
Aapo
e6ef62e711 [TD] Fix regression in Dimensions: Setting arbitrary under tolerance was somehow lost. 2021-01-31 15:17:46 +01:00
Aapo
212381dcf7 [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
f7c71fd072 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
31adf238e7 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
475f7049c5 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
9ec0cddfde [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
150d03d7fd [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
9de4841d0f 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
6ded863f7d 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
691eaa6e8f [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
ff18dec065 [TD] MDIViewPage: Support printing/exporting arbitrary custom paper sizes for Qt5. 2021-01-19 11:03:24 +02:00
Aapo
7339646638 [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
691051e1df [TD] Fix Dimension unit printing problem for US building units and other multivalueschema. 2021-01-18 21:52:35 +02:00
donovaly
1a296a4006 [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
81ff5a422f [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
c50796e009 Merge pull request #4263 from donovaly/TD-tweaks
[TD] preferences entry and tolerance step size
2021-01-11 12:21:40 +01:00
donovaly
699baa8477 [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
96eaff8e4e [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
donovaly
2232b1d48e [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
Abdullah Tahiri
4facab0936 Gui: Colorful/Greyable overlay status in icons
===============================================

Before this implementation, specific status via former mergeOverlayIcon() was greyed out
with the visibility.

With this commit, the developer has two options:

a) override mergeGreyableOverlayIcons, in which case the overlay will
be greyed out when the item is greyed out as per former mergeOverlayIcon()

b) override mergeColorfulOverlayIcons, in which case the overlay will
be superimposed after the icon is greyed out as it is the case for stardard
error and recompute flags.
2021-01-06 13:54:00 +01:00
Mateusz Skowroński
9ee06a098a Fix Qt deprecation warnings. QPrinter::paperSize() and QPrinter::setPaperSize() are obsolete. 2021-01-04 13:40:58 +01:00
Mateusz Skowroński
5b4e76b834 Fix Qt deprecation warnings. QPrinter::orientation() and QPrinter::setOrientation() are obsolete. 2021-01-03 15:08:10 +01:00
wmayer
a9945500d8 TechDraw: [skip ci] restore TAB order of TaskBalloon dialog 2021-01-02 12:00:01 +01:00
donovaly
12c9aa00cf [TD] update balloon dialog
2 weeks ago the properties EndTypeScale and LineVisible were added but not to the dialog.

This PR adds them t the balloon dialog-

It also took the opportunity to cleanup the code:
- add missing tooltips
- uniform tooltips in App and Gui
- uniform the UI element names
2021-01-02 11:49:20 +01:00