Commit Graph

163 Commits

Author SHA1 Message Date
wmayer
44f42a8e2c LGTM: [skip ci] fix: Declaration hides parameter
A local variable hides a parameter. This may be confusing. Consider renaming one of them.
2020-07-27 10:57:34 +02:00
wmayer
864483d550 PVS: V560 A part of conditional expression is always true 2020-07-18 10:59:28 +02:00
wmayer
0a8f4b5103 Gui: [skip ci] improve usability of VectorListEditor 2020-06-29 21:29:12 +02:00
wmayer
602a9a1633 Gui: [skip ci] fix -Wrange-loop-construct 2020-06-22 22:50:55 +02:00
wmayer
771b4738a1 Gui: implement property editor for vector list 2020-06-22 22:28:15 +02:00
wmayer
f9984a0ab1 Gui: [skip ci] fix regression by using UTF-8 encoding in PropertyItem::setPropertyValue 2020-04-03 16:22:35 +02:00
wmayer
110ea2c68e [skip ci] improve whitespaces 2020-04-03 16:19:24 +02:00
wmayer
5c4ddf42ee Gui: [skip ci] bind spin boxes to object in Placement dialog 2020-03-27 17:08:08 +01:00
wmayer
ec8b1bc072 [skip ci] use QLocale class consistently to make it possible to change it application-wide 2020-03-26 16:37:45 +01:00
Zheng, Lei
34c35f8eff Gui: fix property editor crash on remove dynamic property
The crash happens when the dynamic property is removed due changes of
the very same property.
2020-03-21 15:43:12 +01:00
Zheng, Lei
0633abb70d Gui: refactor link property editor
PropertyLinkItem now support all major types of link property.
PropertyLinkListItem is no longer necessary, but kept for backward
compatible, which is now identical to PropertyLinkItem.

DlgPropertyLink, the link selection dialog, is now made modeless, so
that that user can select geometry sub-element directory from 3D view.
2020-02-11 15:40:27 -05:00
Zheng, Lei
24d935096d Gui: fix missing property editor transaction closing
The problem happens when refreshing property editor while editing.
2020-02-11 15:40:27 -05:00
wmayer
4318375a51 Gui: allow user to set an expression for property editor of vectors 2019-12-28 17:36:41 +01:00
Zheng, Lei
b0c9325432 App: fix PropertyXLink file path saving
Also modified ProeprtyLinkItem to show file path as tooltip.
2019-11-10 11:32:59 +01:00
Zheng, Lei
86b22fe3f6 Gui: force dynamic property item background and text color
To avoid visual problem under dark theme.
2019-11-09 16:17:19 +01:00
Zheng, Lei
c4fec26aaa Gui: improve PropertyXLink display in property view 2019-10-08 10:21:31 +02:00
Tomas Pavlicek
7157a4ac4d TechDraw - Fix Annotation and Symbol international characters mangling 2019-10-07 16:56:09 -04:00
Zheng, Lei
29f5ac736b Gui: sync expression change in property editor
This patch fixes two problems,

When one property item is assigned an expression, auto remove any parent
and child item expressions to avoid expression conflicts.

Disable value update when an property item or any of its parents are
bound by an expression.
2019-10-07 17:24:31 +02:00
Zheng, Lei
be951cc0d8 Gui: fix missing expression highlight in property editor 2019-10-07 17:24:31 +02:00
Zheng, Lei
da19c8489a Gui: fix missing auto update when edit property expression
It only happens when editing expression through property editor context
menu action.
2019-10-07 17:24:31 +02:00
wandererfan
81d2ff358d [App][Gui]Add Filter for PropertyFile in PropertyEditor 2019-09-20 07:56:52 -04:00
wandererfan
dbf0644b60 [Gui]Fix Py SyntaxError on " in PropertyStringList 2019-09-19 06:59:05 -04:00
wmayer
b50b21576e core system
force strict ISO C++ (-Wpedantic)
TODO: still a lot of variadic macros are not valid ISO C++
2019-09-18 01:01:14 +02:00
Zheng, Lei
fd0f4f5654 Split App::AutoTransaction into its own file 2019-09-10 14:17:07 +02:00
Zheng, Lei
69d124a93c Gui: fix property view flickering 2019-09-10 14:17:07 +02:00
wmayer
6d9d94f118 correctly handle custom property names (e.g. sketcher constraints) 2019-09-08 17:32:43 +02:00
Zheng, Lei
ddb17b23b0 Gui: fix property editor crash on recompute
The actual cause of crash in previous commit 80f70ff6 is
Document::recompute() allows aborting using Base::Sequence, which
uses QApplication::processEvent() to catch 'ESC' key press. This local
event loop causes premature deletion of the editor widget.

This patch moves handling of closeEditor before calling recompute().
2019-08-30 14:25:41 +02:00
Zheng, Lei
378314aafb Gui: try to fix property editor crash
Crash stack trace
https://forum.freecadweb.org/viewtopic.php?f=8&t=37757&e=1&view=unread#p327901

It appears to by caused by handling QAbstractItemDelegate::closeEditor
signal twice. Once inside PropertyItemDelegate::editorClosed via slot
connection where the editor is closed/destroyed, the other in
PropertyEditor::closeEditor() which tries to access the destroyed
editor.

This patch removes handling of closeEditor signal in
PropertyItemDelegate.
2019-08-30 13:55:24 +02:00
Yorik van Havre
5a004191a3 Gui: Do not use hard-coded blue color in tree 2019-08-20 20:12:51 -03:00
wmayer
5172c3bc08 Fix clang compiler warnings:
+ fix -Winconsistent-missing-override
+ fix -Wunused-variable
+ fix -Wbraced-scalar-init
+ fix -Wparentheses (View3DInventorViewer::checkGroupOnTop: operator '?:' has lower precedence than '+'; '+' will be evaluated first)
+ fix -Wundefined-bool-conversion (MainWindow::updateActions)
+ suppress -Woverloaded-virtual but fix later
2019-08-17 19:52:12 +02:00
Zheng, Lei
088c282e2e PropertyEditor: fix bug when constructing context menu 2019-08-17 15:32:48 +02:00
Zheng, Lei
2bd4795e80 Gui: property view related changes
* Display property from linked object, colored green,

* Change DlgPropertyLink to support external linking and sub-object
  selection

* Improve large selection performance by using a timer

* Improve TAB key behavior in property editor

* Add context menu to show hidden properties, change property status,
  set expression on any and property, and add/remove dynamic properties

* Optimize expression completer model construction, as the original
  implementation gets prohibitively slow for moderate number of objects.
2019-08-17 15:08:33 +02:00
wmayer
16a84b9605 add some comments 2019-03-04 19:25:43 +01:00
wmayer
f24bed170a fix navigation with Tab or Shift+Tab in property editor 2019-03-04 19:15:53 +01:00
wmayer
5f4deea7c9 fixes 0003794: Shortcut-Key is executed in edit field of a constraint (Combo View) 2019-02-16 21:53:23 +01:00
Mateusz Skowroński
317bcd59c9 Use QString's multi-arg overload to save memory allocations. [-Wclazy-qstring-arg] Thanks Clazy! 2019-02-11 15:39:14 +01:00
wmayer
583917dc17 fix several bugs in LabelEditor to handle PropertyStringList 2018-12-20 23:20:23 +01:00
wmayer
766383d411 fixes 0003726: Property Editor Angle Fields Do Not Respect Units 2018-12-16 21:35:58 +01:00
wmayer
927b496827 fix converting float list to string list in property editor 2018-12-01 11:58:09 +01:00
wmayer
442e2dd381 add method to check if an open transaction is empty
This is needed to avoid to incorrectly abort a transaction if a recompute was done between opening and closing an editor in the property view
2018-11-10 14:50:58 +01:00
wmayer
1c1dfe2215 whitespace improvement 2018-10-17 11:20:18 +02:00
wmayer
571f75204a fixes 0003341: Undoing is missing steps 2018-10-13 12:21:17 +02:00
wmayer
8bf9d368a4 avoid multiple spaces in property name 2018-10-03 18:48:10 +02:00
wmayer
aae8062f15 minor fixes:
make QtCreator happy by removing const & when connecting signal/slots
fix typo in comment
2018-09-11 15:50:27 +02:00
Zheng, Lei
3a81bd5103 PropertyEditor: improve editing experience 2018-09-11 14:51:03 +02:00
wmayer
9e5b31fe2a add missing comma separator in list 2018-09-03 21:33:06 +02:00
wmayer
bb9d737ba1 when adding a dynamic property to the editor then move it to the correct group or create a new group 2018-08-25 13:26:14 +02:00
wmayer
24579fff32 Py3: fix PropertyStringListItem::setValue 2018-08-23 17:46:27 +02:00
Yorik van Havre
11b3f66202 Escape single quotes in PropertyStringList 2018-03-19 13:35:50 -03:00
wmayer
cc00dc85d0 #3325: DlgPropertyLink as editor of Tip property 2018-01-28 22:37:03 +01:00