Commit Graph

90 Commits

Author SHA1 Message Date
luz paz
c93bf6cbae Gui: Issue #0004473: Expose openCommand() to translation
Continuing the work to expose the undo/redo functionality to translation. This commit does so for the src/Gui code.  
Ticket: https://tracker.freecadweb.org/view.php?id=4473
2020-12-01 14:53:35 +01:00
luz paz
38815b9550 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
bitacovir
50bc63e80d Add SVG icons for five Std Tool commands
This commit adds SVG files with icons for these commands. Also, it makes the necessary changes on CommandStd.cpp, CommandDoc.cpp, CommandView.cpp and resource.qrc files. 
Forum Discussion: https://forum.freecadweb.org/viewtopic.php?f=34&t=51502&start=10
2020-11-22 11:58:14 +01:00
bitacovir
b22ab816c1 Add SVG icons for two Std commands
Two Std commands do not have icons for the FreeCAD UI (Menu Edit): Std DuplicateSelection, Std_Alignment.
2020-10-21 16:26:27 +02:00
wmayer
3a7bb6fbbc Gui: [skip ci] make commands print, print preview and print to pdf also active when editig a sketch 2020-10-08 10:57:03 +02:00
luz paz
3ba2a7507c Crowdin: Edits based on feedback from translators [skip-ci]
https://crowdin.com/translate/freecad/27911/en-en#6581566  
https://crowdin.com/translate/freecad/6766/en-en#6584432  
https://crowdin.com/translate/freecad/549/en-en#6578092
2020-07-24 13:49:59 +02:00
wmayer
4807fd3b33 PVS: V730 Not all members of a class are initialized inside the constructor 2020-07-18 10:59:27 +02:00
wmayer
0a40d3981f Gui: [skip ci] rename Std_ExportGraphviz to Std_DependencyGraph 2020-05-13 10:26:57 +02:00
Syres916
a0ec977152 [Gui] Edit Menu Remove Duplicate Shift+E...
....shortcut, return Toggle Edit to pre-Big Merge with no shortcut.

See Discussion https://forum.freecadweb.org/viewtopic.php?f=3&t=44394
2020-04-06 13:04:01 +02:00
wmayer
5dcf6e086e Gui: [skip ci] add user option to disable to open a transaction on manual document recompute 2020-02-15 14:11:39 +01:00
Zheng, Lei
b50914923a App: add class TransactionLocker
To protect some critical transaction from being closed prematurely. It
is currently used to protect transaction of object deletion.
2020-02-11 15:40:27 -05:00
donovaly
6940de3f72 Placement improvements:
- sort the angles x-y-z
- add tooltips to make clear for non-native speakers what axis e.g. the yaw rotates around
- add existing icon to menu entry
2020-01-07 07:38:46 -03:00
wmayer
9fa56345cf 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
f1b569621a Split App::AutoTransaction into its own file 2019-09-10 14:17:07 +02:00
wmayer
1c234373d6 fix MSVC compiler warnings 2019-08-17 19:35:21 +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
Yorik van Havre
f3e9656ef4 Added default shortcut to Toggle Edit mode command 2019-07-06 17:15:24 -03:00
wmayer
032485f7ca Automatic visibility handling of axis cross 2019-06-16 13:05:39 +02:00
wmayer
0b0ae920d6 respect user settings for dialog used in merge-document command 2019-05-02 11:46:10 +02:00
wmayer
136934ea13 in case object deletion fails then make sure to re-enable updates of the main window 2019-03-15 14:43:50 +01:00
wmayer
115ef60a9c fix creation of filter list for export dialog 2019-02-21 23:03:47 +01:00
luz.paz
745f0cb3b4 Crowdin: Continuing to refine translation strings 2019-02-11 16:22:12 +01:00
luz.paz
550a60c43f Crowdin: Several more various fixes 2019-01-30 11:08:03 -02:00
wmayer
3564278739 fixes 0003785: Incorrect extension FCstd instead fcstd 2019-01-21 11:41:16 +01:00
wmayer
11c0c9adde harmonize functions to set camera orientations 2019-01-12 22:59:44 +01:00
wmayer
6e0a90c8f2 enable FREECAD_RELEASE_PDB by default, cleanup cmake file, improve whiespaces 2018-10-15 20:11:58 +02:00
luz.paz
360e581672 Misc. typo and whitespace fixes
ref: https://forum.freecadweb.org/viewtopic.php?f=3&t=30988#p256964
along with other misc. fixes
2018-09-19 17:26:03 +02:00
wandererfan
2e894444f7 Fix #3477 Unintended Deletion
- original fix for #3477 presented message box for each
  inactive selected item.  Now it presents 1 message box
  per document, like the check for deletion of linked
  objects.
2018-05-28 16:46:31 +02:00
luz.paz
69216f3604 sWhatsThis fixes
ref: https://forum.freecadweb.org/viewtopic.php?f=10&t=26687
2018-01-31 19:07:07 +01:00
luzpaz
985980648c Typos: user-facing and trivial
Several typos and uniformity fixes.
Note: 
*SCL/SimpleDataTypes.py is a upstream stepcode file whose fiz has been submitted upstream and accepted.
*the header of Tools/generateBase/generateMetaModel_Module.xsd  had redundant data. It has been removed. Please double check it.
2017-12-02 14:00:57 +01:00
wmayer
48155db774 issue #0002080: Attempt to remove FEM analysis result (displacement & stress) results in false warning 2017-10-18 19:46:20 +02:00
Stefan Tröger
5da7aed8e1 Update Group/Part Icons and copy/paste behaviour 2017-09-09 16:55:55 +02:00
wmayer
f551bf9cc3 introduce flag to skip recomputes of a document when needed 2016-10-21 22:23:34 +02:00
wmayer
1e6dcabefc fix -Wextra in FreeCADGui 2016-09-21 20:54:52 +02:00
wmayer
e8554cc77a do not use doCommand without using format string, add overloaded method of runCommand 2016-09-15 18:53:37 +02:00
wmayer
39ab11c701 + issue #0002578: Duplicate objects copied and exported 2016-06-16 14:40:28 +02:00
wmayer
090950ddba + rework message box in revert command 2016-05-20 13:02:28 +02:00
wmayer
265894e142 + fixes #0002401: Freecad 0.16, sketcher doesn't allow save as 2016-05-05 21:49:54 +02:00
Alexander Golubev
625ba08226 Gui: forbid to delete OriginFeatures 2016-04-12 18:12:19 +02:00
Alexander Golubev
ade1dec103 Revert "part deletion handling"
This reverts commit 6ab2002021ac1df26ebe77f488f5cd94e1df0b26.
2016-04-12 18:12:17 +02:00
Stefan Tröger
1ebe3e729c part deletion handling
-remove everxthing that belongs to a part on deletion
-disallow to delete the origin by the user and only remove it when Part is being deleted
2016-04-12 18:12:13 +02:00
blobfish
bc0699ae97 App: Document: recompute document upon delete 2016-04-12 18:12:04 +02:00
blobfish
63c8e498d8 App: Doc: affected labels list in delete command 2016-04-12 18:12:04 +02:00
wmayer
f25dd58bc9 + make 'Merge project' undo/redoable 2016-04-10 17:59:58 +02:00
Mateusz Skowroński
c275b35d48 QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:25 +01:00
Mateusz Skowroński
0695552cff QString::toAscii() is obsolete in Qt5. Replace it with toLatin1().
This change is Qt4/Qt5 neutral.
2016-01-05 16:06:48 +01:00
wmayer
0a120ba84d + do view fit only on file import if document was empty 2015-11-26 20:24:00 +01:00
Mateusz Skowroński
05f95c0506 Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
wmayer
ef203bc260 + fixes #0001238: Preferences: set temp files directory 2015-09-19 16:07:33 +02:00
Yorik van Havre
e122ea8bf7 Added SaveCopy command
This command saves a copy of the current document under a new name,
without modifying the document itself.

Available in menu File -> Save a Copy or from python with
FreeCAD.ActiveDocument.saveCopy(filename)
2015-09-02 13:38:14 -03:00