Commit Graph

123 Commits

Author SHA1 Message Date
wmayer
f14371bc06 convert enum to enum class to fix -Wgnu-redeclared-enum 2019-11-13 22:39:27 +01:00
Zheng, Lei
2df3052ecf Gui: add new API ViewProviderDocumentObject::allowOverride()
This API is used to delcare if a view provider can be used as an
override for a give object.

Conflicts:
	src/App/DocumentObject.h
2019-10-06 17:22:57 +02:00
luz.paz
fb32601746 Fix various (doxy) typos and whitespace issues
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,currenty,dof,doubleclick,dum,eiter,elemente,feld,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml`
2019-10-03 07:57:13 +02:00
wmayer
37287cf9d9 fix further file names vulnerabilities in core system and Image module 2019-10-02 15:07:13 +02:00
wmayer
9e5ab2d6fa when cloning a 3d view then also set the new view into edit mode in case the original view is 2019-10-01 19:35:51 +02:00
wmayer
736417989b make sure resetting a document while closing it works independently of the activw view 2019-10-01 16:37:07 +02:00
Zheng, Lei
f1b569621a Split App::AutoTransaction into its own file 2019-09-10 14:17:07 +02:00
Zheng, Lei
f55b4ca7f7 Gui: minor adjustment on command status update 2019-09-10 14:17:07 +02:00
wmayer
7ee903f27c avoid explicit cast to ZipInputStream in Gui::Dcoument class 2019-09-06 12:37:09 +02:00
wmayer
f88dad0905 use shared_ptr to avoid possible memory leaks and improve exception-safety 2019-09-03 17:21:13 +02:00
Jean-Marie Verdun
a2e21f79f2 Add initial version of the Cloud workbench 2019-09-03 17:21:05 +02:00
Zheng, Lei
18dffcba47 Gui: auto close transaction on Document resetEdit 2019-08-30 15:49:59 +02: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
ea49e40b78 fix msvc build failure 2019-08-17 17:12:42 +02:00
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