Commit Graph

2455 Commits

Author SHA1 Message Date
Zheng, Lei
087349c07a Gui: add warning to DlgExpressionInput
Warn when binding expression with unit to unit-less properties.
2019-08-30 15:52:03 +02:00
Zheng, Lei
e8e1a67e50 Gui: restore static property order in PropertyView 2019-08-30 15:51:47 +02:00
Zheng, Lei
18dffcba47 Gui: auto close transaction on Document resetEdit 2019-08-30 15:49:59 +02:00
Zheng, Lei
b4c500776d Gui: fix PythonWrapper::fromQIcon() 2019-08-30 15:47:39 +02:00
Zheng, Lei
656303fe9f Gui: fix ViewProviderLink dropObjectEx() 2019-08-30 15:46:10 +02:00
Zheng, Lei
ed3a759018 Gui: fix GeoFeatureGroupExtension
The change in ViewProviderGeoFeatureGroupExtension.claimChildren() is
so that GeoFeatureGroupExtension.getSubObjects() can exclude non direct
children.
2019-08-30 15:45:21 +02:00
Zheng, Lei
432c9ae15b Gui/PartDesign: fix setActiveObject() for Part and Body 2019-08-30 15:02:48 +02:00
Zheng, Lei
778ccc2692 Gui: more exception handling in tree view 2019-08-30 15:01:25 +02:00
Zheng, Lei
0bc6722943 Gui: add View3DPy.hasClippingPlane() 2019-08-30 15:00:42 +02:00
Zheng, Lei
5bc298cf18 Gui: handle exception in tree view double click 2019-08-30 14:52:09 +02:00
Zheng, Lei
d6967438f1 Gui: fix ExpressionCompleter for property 2019-08-30 14:51:33 +02:00
Zheng, Lei
4b74659308 Gui: fix tree view document double click activating 2019-08-30 14:50:52 +02:00
Zheng, Lei
8a99ef34ec Gui: use ExpressionLineEdit for tree view object search
Tree view is already using expression for object search. This patch
adds the expression completer feature for search result suggestion.
2019-08-30 14:50:15 +02:00
Zheng, Lei
782913407a Gui: improve expression completer
Proper support of completing an edit in the middel of an expression.

Also support 'noProperty' mode in the completer, where no completion is
offered for property names. This will be used by tree view object
search.
2019-08-30 14:49:14 +02:00
Zheng, Lei
d270d60950 Gui: expose link command to global toolbar 2019-08-30 14:43:32 +02:00
Zheng, Lei
71530bb1a6 Gui: allow SelectionSingleton::hasSubSelection() check for sub-element
This is used by relative link command activation for sub-element
selection
2019-08-30 14:43:04 +02:00
Zheng, Lei
0e115be0ec App: make recompute aborting optional 2019-08-30 14:41:46 +02:00
Zheng, Lei
a6da78b4e5 Gui: expose MainWindow:showStatus()
Tree view now uses this to show error on hovering over object in error.
2019-08-30 14:33:31 +02:00
Zheng, Lei
27a2ebed71 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
6aec9ffed7 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
wandererfan
f68e58e389 [TD]Prevent crash in SelectionSingleton
- in SelectionSingleton::setVisible, if the selection changes during
  loop, a crash may occur.
- in QGraphicsScene, hiding an item changes its selected status.
2019-08-28 12:20:42 -04:00
wandererfan
fca04f592e [Gui] clean up sloppy merge 2019-08-28 08:38:27 -04:00
wandererfan
ab180c761e [TD]Make TD View from ActiveView 2019-08-28 08:38:27 -04:00
wandererfan
76be82dc2e [Gui]Add options for page size, lineWidth and background 2019-08-26 09:07:30 -04:00
wmayer
5af586b92e Add parameter to suppress touching a document when a view provider has been modified 2019-08-24 15:54:41 +02:00
wmayer
fd90936b5d issue #0004088: Visibility of origin feature of Part container changes when undocking the 3d view 2019-08-24 13:33:21 +02:00
wmayer
b0fac402ad Fix bug in MainWindow::setActiveWindow
The method MainWindow::setActiveWindow() must not automatically add a view to the mdi area if it's not part of it because this causes a crash when trying to make a fullscreen window or undock a view.
Instead the calling instance must explicitly call MainWindow::addWindow where needed.
2019-08-23 23:44:19 +02:00
wmayer
aa3803a624 improve error search when parameter group or name of a PrefWidget is not set 2019-08-23 12:53:03 +02:00
Pablo Gil
b836d5f634 update CMakeList to include new Darker stylesheets 2019-08-22 17:57:14 +02:00
wmayer
8e582d68c4 use GNU directory structure on non-Windows systems 2019-08-22 16:57:11 +02:00
luz.paz
d38ac4d6b4 Stylesheets: typo and uniformity fixes
Follow-up to b28e914ce and 266beccb
CC @pgilfernandez
2019-08-22 11:25:39 -03:00
Yorik van Havre
72ba2aaf6e Gui: Do not use hard-coded blue color in tree 2019-08-20 20:12:51 -03:00
Pablo Gil
e1e007c1fe typo fixed 2019-08-20 10:31:35 -03:00
Pablo Gil
7a4df18fc2 New Darker stylesheet 2019-08-20 10:31:35 -03:00
Pablo Gil
a495d01724 update to v2.20:
- minor fixes
- new background icon
2019-08-20 10:31:35 -03:00
Pablo Gil
99b62e61b4 new background icon 2019-08-20 10:31:35 -03:00
Pablo Gil
72ce5efc73 add missing icon for light themes 2019-08-20 10:31:35 -03:00
wmayer
4068df6483 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
wmayer
1c234373d6 fix MSVC compiler warnings 2019-08-17 19:35:21 +02:00
wmayer
ea49e40b78 fix msvc build failure 2019-08-17 17:12:42 +02:00
Zheng, Lei
cecf15291f Gui: sort property by name in property view 2019-08-17 15:32:51 +02:00
Zheng, Lei
1fecb7c4cc Gui: fix tree view selection focus problem 2019-08-17 15:32:51 +02:00
Zheng, Lei
b1a2007759 Gui: fix missing de-highlight when (pre)selection is disabled 2019-08-17 15:32:51 +02:00
Zheng, Lei
f36714974a Command: disable auto transaction if triggering editing
Each command will create an App::AutoTransaction to auto create and
commit a transaction for proper undo/redo. But if the command starts
editing, the current transaction may be required to out live the current
command.

Note that the command can only detect editing if the code calls
Gui::Document::setEdit(). There are objects that starts editing by
calling its own ViewProvider::setEdit(), e.g. various TechDraw
ViewProviders. In this case, to avoid auto committing, one can call
App::Application::setActiveTransaction() with the second argument set to
true, or call App::AutoTransaction::setEnable(false).
2019-08-17 15:32:51 +02:00
Zheng, Lei
5f5ea31ec8 TreeView: update status on manual object touch 2019-08-17 15:32:51 +02:00
Zheng, Lei
6aab2df588 TreeView: fix selection sync problem 2019-08-17 15:32:50 +02:00
Zheng, Lei
ba0d573369 Gui: fix selection change handling in PropertyView 2019-08-17 15:32:50 +02:00
Zheng, Lei
3f4b483011 TreeView: fix potential crash on deleting object 2019-08-17 15:32:50 +02:00
Zheng, Lei
31626d5c85 Gui::Document: fix saving of camera setting 2019-08-17 15:32:50 +02:00
Zheng, Lei
bd7493bd2b TreeView: fix bug in selection sync 2019-08-17 15:32:50 +02:00