Commit Graph

72 Commits

Author SHA1 Message Date
Chris Hennes
4daf73c61a Release handler in commands where not needed
Fixes #0004478: Active constraint tool blocks sidebar tasks from working.

Many commands are interrupted by the existence of a handler. Rather than having these commands silently cancel, purge the handler if a command executes that does not need it.

When right-clicking on an item in the Constraint Task sidebar, any current operation is cancelled and the FreeCAD selection is synced with the selected items in the constraints QListWidget. This allows all of the menu items in the context menu to function properly: if the selection is not synced, anything that relies on the FreeCAD selection (like Delete) will sillently fail.
2020-11-07 20:17:19 +01:00
vocx-fc
ec0acf44f1 Sketcher: rename constraint icons to be more consistent with the rest
`Sketcher_ConstrainBlock` to `Constraint_Block`.
`Sketcher_ConstrainLock` to `Constraint_Lock`, and the corresponding
`_Driven` variant.

Adjust the icons in the taskpanel for the sketcher constraints,
elements, and for the action menu for constraints.

Adjust the icon order in the `Sketcher.qrc` resource file.
2020-10-01 09:59:26 +02:00
wmayer
d6169d6478 boost: fix for boost < 1.60 2020-06-15 19:38:39 +02:00
wmayer
730154a684 boost 1.73.0: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated 2020-06-12 17:51:33 +02:00
wmayer
9ed9d30338 Qt5: 'static bool QPixmapCache::find(const QString&, QPixmap&)' is deprecated: Use bool find(const QString &, QPixmap *) instead [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
d488218701 [skip ci] fix more -Wgnu-zero-variadic-macro-arguments 2019-11-17 19:11:08 +01:00
Zheng, Lei
0f66755843 Sketcher: fix external editing 2019-08-17 15:32:50 +02:00
Zheng, Lei
d4ac072306 Gui: support in-place editing
The link support means that an object can now appear in more than one
places, and even inside a document different from its own. This patch
adds support for in-place editing, meaning that the object can be edited
at correct place regardless where it is.

See [here](https://git.io/fjPIk) for more info about the relavent APIs.

This patch includes two example of modifications to support in-place
editing. One is the ViewProviderDragger, which simply adds the dragger
node to editing root node by calling
View3DInventorViewer::setupEditingRoot(dragger). The other much more
complex one is ViewProviderSketch which calls setupEditingRoot(0) to
transfer all its children node into editing root. ViewProviderSketch
also includes various modifications to command invocation, because we
can no longer assume the active document is the owner of the editing
object.

This patch also includes necessary modification of the 'Show' module to
support in-place editing.
2019-08-17 15:08:32 +02:00
Abdullah Tahiri
3facea7ed0 Sketcher: Constraints' widget deactivated constraints commands and representation 2019-06-22 08:26:31 +02:00
Abdullah Tahiri
62e721e8fd Sketcher: GUI PCH 2019-05-02 07:12:51 +02:00
triplus
92efd5fbe9 Improved icon themes support 2019-02-13 10:42:46 -02:00
wmayer
a67ee5648c remove trailing spaces 2018-11-05 10:53:01 +01:00
Abdullah Tahiri
21f2e79021 Sketcher: Refactor code relating to dimensional constraint checks 2018-11-04 14:41:20 -03:00
wmayer
4fd9d1078d fix segfault in ExpressionDelegate in case constraint property is invalidated 2018-10-04 23:34:19 +02:00
wmayer
80cd28bec9 comment out unused icons (to fix C2603 MSVC error) 2018-07-30 09:52:41 +02:00
Abdullah Tahiri
12025a02ed Sketcher: Constraint Widget support for the diameter constraint 2018-07-30 00:47:25 +02:00
Abdullah Tahiri
278c8266cd Sketcher: Optional extended naming for constraints widget giving first-second-third information 2018-05-31 14:29:00 +02:00
luz.paz
68c4b22315 Source typos fixes 2018-05-11 10:02:56 -03:00
wmayer
b780ba650f fix scan coverity issues 2018-02-10 14:29:49 +01:00
wmayer
1eaf70a80e add command to show/hide several constraints at once 2018-01-27 21:10:01 +01:00
wmayer
b147e4c810 fix crash when deleting constraint 2018-01-27 17:08:49 +01:00
wmayer
1f8f27b5e8 improve whitespaces 2018-01-27 16:47:55 +01:00
Abdullah Tahiri
a33f094e46 Sketcher: constraints' widget checkbox as python command
========================================================

Enables do/undo after switching constraints from one space to the other
2018-01-26 17:05:25 +01:00
Abdullah Tahiri
847becb32c Sketcher: Extend virtual space switching and update to constraints widget 2018-01-26 17:03:39 +01:00
Abdullah Tahiri
600bcf9513 Sketcher: Extension of Constraints Widget to support checkboxes for Virtual Space
=================================================================================

The checkboxes enable a constraint to swap virtual space.

If checked the constraint is visible in the selected space and hidden in the other space (Real Space or Virtual Space).
If unchecked the constraint is visible in the other space and hidden in the selected space.
2018-01-26 17:01:35 +01:00
Abdullah Tahiri
46aa2c6356 Sketcher: Change nomenclature relating to Block constraint 2018-01-22 22:52:56 +01:00
Abdullah Tahiri
fc0e6478f3 Sketcher: Constraint widget adapted to Block constraint 2018-01-22 22:52:56 +01:00
wmayer
1050378a2e avoid error 'Duplicate constraint not allowed' when deleting a constraint 2017-12-31 01:57:44 +01:00
wmayer
337657e85d when painting items make sure that constraint id is in range 2017-12-02 10:11:45 +01:00
wmayer
1b81ffaaaf fix crash ExpressionDelegate::paint 2017-04-20 22:31:18 +02:00
Abdullah Tahiri
be1cf4044f Sketcher: Hide Internal Alignment Constraints 2017-04-17 20:53:12 +02:00
Mateusz Skowroński
013d51e1c2 QStyleOptionViewItemV4 is deprecated in Qt5. Replace it with QStyleOptionViewItem. 2017-02-12 05:46:07 +01:00
wmayer
97905b8c7b issue #0002816: Trimming tool crashes 2017-01-23 19:06:48 +01:00
wmayer
a34c441373 Qt4/Qt5 neutral changes:
+ replace Q_WS_WIN with Q_OS_WIN
+ replace Q_WS_X11 with Q_OS_LINUX
+ replace Q_WS_MACX with Q_OS_MACX
+ set explicit cast to HWND
2016-12-12 14:09:21 +01:00
wmayer
c06b6f081f fix -Wextra in Sketcher 2016-09-22 18:34:35 +02:00
wmayer
d1d9db6d1c fix Coverity issues 2016-08-20 19:45:36 +02:00
Eivind Kvedalen
00516cc409 Sketcher: Changed return type of Constraint::getPresentationValue() to Quantity, to be able to include unit. 2016-06-18 09:48:52 +02:00
Eivind Kvedalen
625a5b7945 Sketcher: Fixed radian/degree mix-up for Angle constraint. 2016-06-18 09:48:46 +02:00
DeepSOIC
acec16d5dc Sketcher: never ever hide constraint value sign, anymore 2016-03-12 21:28:22 +01:00
wmayer
ab449f5dd8 + on rename of contraint make sure that new name is different, on swap constraint names make sure they have user-defined names 2016-03-12 20:02:18 +01:00
wmayer
edd55999cc + fixes #0002471: In constraint context menu, 'Change Value' is always greyed out 2016-03-12 15:26:06 +01:00
Mateusz Skowroński
c275b35d48 QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:25 +01:00
wmayer
bc4f4de54b + fix compiler warnings 2015-12-30 10:58:14 +01:00
Eivind Kvedalen
208ba9eb9d Sketcher: Fixed keeping sign of constraints. 2015-10-06 21:26:22 +02:00
wmayer
92b330bbcb + support of unicode names for sketch constraints 2015-09-24 03:17:47 +02:00
Eivind Kvedalen
cacf7bdaf1 Sketcher: Added support for expressions. 2015-09-21 14:51:10 +02:00
wmayer
d9aa9e4bf1 + fixes #0000870: Center sketch to a constraint that has been double clicked in the constraint list. 2015-09-15 17:24:23 +02:00
wmayer
f0c9368f71 + minor changes 2015-09-13 23:24:12 +02:00
wmayer
756a9c8130 + fix various warnings with gcc 2015-09-01 19:29:39 +02:00
wmayer
6b3340e7b5 + include missing header files 2015-07-01 13:02:29 +02:00