* Fix and add menu accelerators: menus common to all workbenches
I use menu accelerators fairly often, so I find it very frustrating when
they are missing, or worse, they don't work due to the same letter being
assigned to several commands.
This patch adds accelerators to lots of menu entries missing them and
fixes broken accelerators.
Wherever possible, standard accelerator keys are used:
https://doc.qt.io/qt-5/accelerators.html
This commit covers accelerator fixes that are common to all workbenches.
Accelerator fixes for specific workbenches will be done in separate
commits.
* Add missing accelerators: Spreadsheet workbench
FreeCAD doesn't have a shortcut for Preferences.
As far as I know there is no established standard for Preferences. I
chose Ctrl+, as that is used by a number of applications, like VS Code,
nautilus and gedit.
* Add safe-mode which starts freecad in a clean environment
* Integrate safe-mode
* Show "(Safe Mode)" in main window title
* Show safe mode info when safe mode is started
* Created Safe Mode Icon
* Use new icon
* Add PreCompiled.h
* Add exports for windows
---------
Co-authored-by: Gabriel <gaz082@gmail.com>
- isRebootRequired is not public but in accept&reject.
- PreferencePage::isRebootRequired changed to const
- Change 2 warnings to log
- remove useless c_str()
- Change DlgPreferencesImp::isRebootRequired name + reboot by restart everywhere.
- Sort workbenches so that disabled wb are sorted.
* On lines where the variable type is obvious from inspection, avoid repeating the type using auto.
* When possible use a ranged for loop instead of begin() and end() iterators
NOTE: this is purposely version 0.21, despite the release goal is 1.0
Since we issue weekly builds, people might otherwise misunderstand the version
So first when the release goal is reached, FreeCAD becomes version 1.0
This will essentially not update the tooltip when an action is checked as it isn't suitable
As example, view DrawStyle command where the group tooltip is better than the selected action tooltip
Only UserEditMode is implemented in this commit, should be pushed to DrawStyle and maybe other after merge
QAction defaults menu role to TextHeuristicRole, which causes qt to
guess the menu role based on action title. And titles start with
'Config', 'Options', 'Settings', etc. will be considered as preference
menu. It seems some non-english translation causes the wrong action be
chosen as preference, such as 'Treeview actions'.
This commit just applied a temporary fix to default to QAction::NoRole
for GroupCommand. If there is ever some GroupCommand need to be a
system menu item on macos, we could add some command bit flag for that
purpose.
This commit adds SVG files with icons for these commands. Also, it makes the necessary changes on CommandDoc.cpp, CommandWindow.cpp, CommandStd.cpp and resource.qrc files.
* invoke(), distinguish between command triggering source. Also add
support of auto transaction using App::AutoTransaction. Now all
command will support undo/redo by default.
* setupCheckable(), a helper function to Improve support of
PythonGroupCommand
* getObjectCmd(), helper function to output Python command to refer to
an object without ambiguity. Because with introduction of external
linking, an object can no longer be safely referred through the
current active document.
* Support auto MacroManager command logger. For commands that does not
log any output to MacroManager, a log entry of 'Gui.runCommand()' will
be auto generated.
* Support linked object in copyVisual()
* Modified do/runCommand() to print calling file and line number.
* Add various helper macros for run command involving a document or
object.