Commit Graph

108 Commits

Author SHA1 Message Date
Zheng, Lei
5f5ea31ec8 TreeView: update status on manual object touch 2019-08-17 15:32:51 +02:00
Zheng, Lei
31626d5c85 Gui::Document: fix saving of camera setting 2019-08-17 15:32:50 +02:00
Zheng, Lei
648f5e6d5b Gui: fix auto view switching of editing object 2019-08-17 15:32:50 +02:00
luz.paz
63a577fe07 Fix typos in src/Gio 2019-08-17 15:32:49 +02:00
Zheng, Lei
0c6b1a5d69 Gui: Application/Document/MainWindow changes following App namespace
Application:

* signalNewDocument, check the extra argument, isMainDoc, the decide
  whether to create view of the new document. This is so that external
  linked document can be opened in background without crowding the tab
  list.

* slotDeleteDocument, calls Document::beforeDelete()

* slotActiveDocument, creates view if none, because external document
  is now opened without view.

* onLastWindowClosed(), switch to next active document, and creates view
  if none.

* send(Has)MsgToFocusView(), new API to send message to the active view
  in focus. This is to solve the ambiguity of things like pressing
  delete key, copy, paste handling when the active new is not in focus.
  For example, when spread sheet view is active, delete/copy/paste
  handling should be different when the focus on the spread sheet view
  or focus on tree view.

* tryClose(), delegate to MainWindow for close confirmation

* reopen(), new API to reload a partial document in full

Document/DocumentP:

* _CoinMap, new internal map for quick access view provider from its
  root node.

* slotNewObject, modified to support view provider override from
  App::FeaturePython, through new API
  DocumentObject::getViewProviderNameOverride().

* slotDeletedObject/slotTransactionRemove, improve handling of geo group
  children rebuild

* slotSkipRecompute, add special handling of document with skip
  recompute. Some command cannot work when skip recompute is active.
  For example, sketcher command will check if recompute is successful
  on many commands, and will undo if not. New 'PartialCompute' flag is
  added to allow recompute only the editing object and all its
  dependencies if 'SkipRecompute' is active.

* slotTouchedObject, new signal handling of manually touched object.

* setModified(), do nothing if already modified. This is a critical
  performance improvement, because marking tab window as modified turns
  out to be a relatively expensive operation, and will cause massive
  slow down if calling it on every property change.

* getViewProviderByPathFromHead/getViewProvidersByPath(), new APIs to
  obtain view provider(s) from coin SoPath.

* save/saveAll/saveCopy, modified to support external document saving.

* Save/RestoreDocFile(), save and restore tree item recursive expansion
  status.

* slotFinishRestoreObject(), handle new signal
  signalFinishRestoreObject(), unifies postprocessing in restore and
  import operation.

* createView/setActiveView(), add support of delayed view creations

* canClose(), delegate to MainWindows to ask for confirmation

* undo/redo(), support grouped transaction undo/redo. Transactions may
  be grouped by the same transaction ID if they are triggered by a
  single operation but involves objects from multiple documents.

* toggleInSceneGraph(), new API to add or remove root node from or to
  scenegraph without deleting the view object.

MainWindow:

* Update command status using a single shot timer instead of periodical
  one.

* Improve message display is status bar. Give error and warning message
  higher priority (using QStatusBar::showMessage()) than normal status
  message (using actionLabel), reversed from original implementation.

* confirmSave(), new API to check for modification, and ask user to save
  the document before closing. The confirmation dialog allows user to
  apply the answer to all document for convenience.

* saveAll(), new API to save all document with correct ordering in case
  of external linking.

* createMimeDataFromSelection/insertFromMimeData(), support copy paste
  object with external linking. A new dialog DlgObjectSelection is used
  to let user select exactly which object to export.

CommandDoc/CommandWindow:

* Related changes to object delete, document import, export, and save.
2019-08-17 15:08:33 +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
Zheng, Lei
5214f5b7ce Gui: add coinRemoveAllChildren to work around Coin3D bug
See bug description:
https://bitbucket.org/Coin3D/coin/pull-requests/119/fix-sochildlist-auditing/diff

Because of path based rendering (SoFCPathAnnotation) in mouse over
highlight, this bug causes crash more frequently here comparing to
upstream.

All C++ calling of SoGroup::removeAllChildren() is replaced by
Gui::coinRemoveAllChildren(), and python code is fixed by monkey
patching SoGroup.removeAllChildren() in FreeCADGuiInit.py.
2019-08-17 14:52:11 +02:00
wmayer
7646e54580 fixes 0003986: Changing view attributes does not trigger 'File changed' status 2019-05-26 23:25:58 +02:00
wmayer
140979a278 fix saving view provider attributes for Copy&Paste or Duplicate selection 2019-02-28 18:48:30 +01:00
wmayer
1308a02c83 when restoring object then only expand single items, not its parent items 2019-02-24 00:37:53 +01:00
Mateusz Skowroński
ac508516da Use QString's multi-arg overload to save memory allocations. [-Wclazy-qstring-arg] Thanks Clazy! 2019-02-11 15:39:14 +01:00
wmayer
36271b4052 move from deprecated boost.signals to boost.signals2 library 2018-10-30 19:09:03 +01:00
wmayer
f513305916 fix crash with Py3 when releasing memory buffer 2018-10-29 11:59:34 +01:00
wmayer
addb742b3c minor fixes 2018-10-08 12:27:03 +02:00
wmayer
b129511910 fixes #0003540: Body invisible after deleting Part container 2018-09-21 15:12:38 +02:00
wmayer
ef42cfb5d6 add method to activate 3d view when setting active object list 2018-09-12 15:38:28 +02:00
wmayer
dd0b80e5c1 fix possible stack overflow when finishing edit mode 2018-05-24 19:37:16 +02:00
luz.paz
9167064fc1 Misc. typos
Found via `codespell`
2018-04-25 09:41:33 -03:00
wmayer
91fe3d46fe fixes #0003350: Draft Snapping does not recognize App::Part container 2018-02-20 11:19:49 +01:00
wmayer
2cd338ba03 improve whitespaces 2017-11-24 15:43:28 +01:00
luzpaz
a225b13bef Misc. typos
- Tooltip uniformity 
- source comment typo fixes
- remove double whitespaces
2017-11-24 09:45:08 -02:00
wmayer
b676fb8aa7 on project save go through all mdi views until one handles the GetCamera message 2017-10-16 10:39:51 +02:00
Unknown
fa4a6b43ee Capitalize beginning of tooltips + Typos
Capitalized all remaining uncapitalized tooltips. 
+ Fixed typo in instantiate() function. Shouldn't have any repercussions on the code, AFAICT. 
+ other typos
2017-10-13 00:26:53 +02:00
wmayer
5604e64f54 Various fixes:
+ disable VBO rendering in split views
+ activate multi-sampling in split view for manual alignment
+ share GL widget in case a document has multiple views to make VBO rendering work correctly
2017-09-23 11:14:41 +02:00
Stefan Tröger
f2249d1eb2 Prevent ViewProvider at toplevel when adding object to Group in GeoFeatureGroup 2017-09-09 16:55:55 +02:00
Stefan Tröger
97828a9ce5 Ensure viewprovider is shown after drop from claimChildren3D fixes #0003078 2017-09-09 16:47:07 +02:00
wmayer
234df4e661 calling close() causes the MDI view to get deleted as soon as possible while deleteLater() waits until the GUI is responsive 2017-07-17 11:11:58 +02:00
wmayer
2f5ff3186c fix for mixing up SchemeVersion and FileVersion 2017-07-06 17:59:01 +02:00
wmayer
ffa10bbf0c Qt5: workaround for undocking of mdi view
fix minor issues reported by clang static analyzer
2017-05-03 22:01:46 +02:00
wmayer
ba9ffed16b fix scan coverity issues 2017-04-11 15:06:37 +02:00
wmayer
9e42badfaf move QuarterWidget to QOpenGLWidget 2017-03-21 20:37:03 +01:00
Kunda
de2392eb18 source typo fixes pt5
+ cleaning up some more non-short-URLs
Issue #2914
2017-03-04 13:07:13 -03:00
Stefan Tröger
b09ca0c787 Extensions: Implement persistence 2016-12-11 19:27:35 +01:00
Sergo
c12f81814f check extension, get children 2016-12-09 21:31:51 +01:00
Sergo
6fdecb93de fixes #0002633 - body disappear if dragged out of Part container 2016-12-09 21:31:51 +01:00
Stefan Tröger
0ae9346b3c Extenions: Drop virtual inheritance
Due to problems onthe windows platform the virtual inheritance approach must be dropped. NExt to the already reimplemented proeprty interface the Type interface is reimplemented too. This change allows to revert some earlier changes.
2016-10-08 12:48:34 +02:00
Stefan Tröger
2a61aec97b Extensions: Fix rebase errors 2016-10-08 12:48:34 +02:00
wmayer
bb103cba18 convert utf-8 encoded path name to escaped unicode when saving document with Python 2016-09-12 20:58:41 +02:00
wmayer
252459e8e7 Define shortcuts for Save & Discard buttons of message box that appears when closing a document 2016-08-22 18:58:10 +02:00
wmayer
4686997786 fix more Coverity issues 2016-08-17 21:55:00 +02:00
wmayer
683f943d38 Coverity issues:
129097
129098
129099
129101
129102
129132
129134
129203
2016-08-16 16:34:51 +02:00
wmayer
554875b930 add method to get view that contains a given node 2016-08-14 18:01:10 +02:00
wmayer
ac32ab0b00 + fix order of removed objects in transaction list
+ add assert to check for obvious error
+ removed unneeded method
2016-07-23 11:47:01 +02:00
wmayer
e471ebe1fb prepare view provider for undo/redo 2016-07-23 11:45:38 +02:00
wmayer
ec777b540f + make Document::getViewOfViewProvider() working reliably also for view providers that are a child of another view provider 2016-05-23 11:06:50 +02:00
Stefan Tröger
f784daf7f1 Ensure claimchildren3d is always respected
With the new setup object signals it may happen that a document object claims children but has no property changed after the viewprodivers creation. This scenario is not supportet up to now as the scene graph children are only set when the object changes.
2016-04-12 18:12:20 +02:00
Alexander Golubev
ad64c4f453 Fix a crash then sketch calls recalculation 2016-04-12 18:12:17 +02:00
Stefan Tröger
982af48e86 make new document views obey the scene graph children stacking 2016-04-12 18:12:08 +02:00
Stefan Tröger
5ac3de35d1 dont remove already removed view providers from the toplevel inventor node 2016-04-12 18:11:56 +02:00
jriegel
8eb0d198f8 First claimChildren3D implementation and Starting PartItem implementation 2016-04-12 18:11:45 +02:00