Commit Graph

114 Commits

Author SHA1 Message Date
wmayer
10cd535ceb use shared_ptr to avoid possible memory leaks and improve exception-safety 2019-09-03 17:21:13 +02:00
Jean-Marie Verdun
27e7b9913a Add initial version of the Cloud workbench 2019-09-03 17:21:05 +02:00
Zheng, Lei
f7d416d15e Gui: auto close transaction on Document resetEdit 2019-08-30 15:49:59 +02:00
wmayer
b1551934b4 Add parameter to suppress touching a document when a view provider has been modified 2019-08-24 15:54:41 +02:00
wmayer
1e19ef5be4 issue #0004088: Visibility of origin feature of Part container changes when undocking the 3d view 2019-08-24 13:33:21 +02:00
wmayer
1995f9d0ba fix msvc build failure 2019-08-17 17:12:42 +02:00
Zheng, Lei
78ce18ace4 TreeView: update status on manual object touch 2019-08-17 15:32:51 +02:00
Zheng, Lei
61df79ab9f Gui::Document: fix saving of camera setting 2019-08-17 15:32:50 +02:00
Zheng, Lei
2cb69603b6 Gui: fix auto view switching of editing object 2019-08-17 15:32:50 +02:00
luz.paz
0f67e8ddfa Fix typos in src/Gio 2019-08-17 15:32:49 +02:00
Zheng, Lei
bd2f5191c9 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
00bcef0619 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
c8891be856 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
f0b10ec85b fixes 0003986: Changing view attributes does not trigger 'File changed' status 2019-05-26 23:25:58 +02:00
wmayer
59a0144a4f fix saving view provider attributes for Copy&Paste or Duplicate selection 2019-02-28 18:48:30 +01:00
wmayer
4e973324ae when restoring object then only expand single items, not its parent items 2019-02-24 00:37:53 +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
f898eafd64 move from deprecated boost.signals to boost.signals2 library 2018-10-30 19:09:03 +01:00
wmayer
1e7aa1becf fix crash with Py3 when releasing memory buffer 2018-10-29 11:59:34 +01:00
wmayer
4ac34d06a8 minor fixes 2018-10-08 12:27:03 +02:00
wmayer
75acfe898f fixes #0003540: Body invisible after deleting Part container 2018-09-21 15:12:38 +02:00
wmayer
876339b885 add method to activate 3d view when setting active object list 2018-09-12 15:38:28 +02:00
wmayer
e4cea7f3ca fix possible stack overflow when finishing edit mode 2018-05-24 19:37:16 +02:00
luz.paz
505488c4f9 Misc. typos
Found via `codespell`
2018-04-25 09:41:33 -03:00
wmayer
b2963382d3 fixes #0003350: Draft Snapping does not recognize App::Part container 2018-02-20 11:19:49 +01:00
wmayer
868d9cc6c2 improve whitespaces 2017-11-24 15:43:28 +01:00
luzpaz
b24a9c9ad4 Misc. typos
- Tooltip uniformity 
- source comment typo fixes
- remove double whitespaces
2017-11-24 09:45:08 -02:00
wmayer
930089c6f0 on project save go through all mdi views until one handles the GetCamera message 2017-10-16 10:39:51 +02:00
Unknown
15c0d38536 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
39e4020bdf 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
fa273f7307 Prevent ViewProvider at toplevel when adding object to Group in GeoFeatureGroup 2017-09-09 16:55:55 +02:00
Stefan Tröger
6d40b1d646 Ensure viewprovider is shown after drop from claimChildren3D fixes #0003078 2017-09-09 16:47:07 +02:00
wmayer
b36686e586 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
6a14bb7451 fix for mixing up SchemeVersion and FileVersion 2017-07-06 17:59:01 +02:00
wmayer
378a1e4f58 Qt5: workaround for undocking of mdi view
fix minor issues reported by clang static analyzer
2017-05-03 22:01:46 +02:00
wmayer
ce36b29cb7 fix scan coverity issues 2017-04-11 15:06:37 +02:00
wmayer
a1dd462de9 move QuarterWidget to QOpenGLWidget 2017-03-21 20:37:03 +01:00
Kunda
19f8fd4c10 source typo fixes pt5
+ cleaning up some more non-short-URLs
Issue #2914
2017-03-04 13:07:13 -03:00
Stefan Tröger
cd1c753fa2 Extensions: Implement persistence 2016-12-11 19:27:35 +01:00
Sergo
47dd79ac25 check extension, get children 2016-12-09 21:31:51 +01:00
Sergo
12b0e0f999 fixes #0002633 - body disappear if dragged out of Part container 2016-12-09 21:31:51 +01:00
Stefan Tröger
3a51404dd5 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
1287f3007a Extensions: Fix rebase errors 2016-10-08 12:48:34 +02:00
wmayer
05a25967bd convert utf-8 encoded path name to escaped unicode when saving document with Python 2016-09-12 20:58:41 +02:00
wmayer
94f07c85ee Define shortcuts for Save & Discard buttons of message box that appears when closing a document 2016-08-22 18:58:10 +02:00
wmayer
13528b0aec fix more Coverity issues 2016-08-17 21:55:00 +02:00
wmayer
ab525189bf Coverity issues:
129097
129098
129099
129101
129102
129132
129134
129203
2016-08-16 16:34:51 +02:00
wmayer
549236f517 add method to get view that contains a given node 2016-08-14 18:01:10 +02:00
wmayer
f2bad4598a + 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
9ec06b47c6 prepare view provider for undo/redo 2016-07-23 11:45:38 +02:00