Commit Graph

3170 Commits

Author SHA1 Message Date
wmayer
1e7929ba59 Gui: add virtual method 'closed' to TaskDialog that is called when deleting a dialog 2021-02-05 16:36:19 +01:00
Chris Hennes
9c9244dfb3 Guard against segfaults due to out-of-order dialog deletion 2021-02-05 15:38:24 +01:00
Chris Hennes
7560a35ea0 Fix minor issues with Workbenches preference panel
This fixes three issues with the new Workbench Loader preferences panel reported by users:
* Some icons were not being properly scaled to the new 48x48 size
* Some text was being incorrectly cut off, despite fitting in the column
* The sort order of the workbenches was incorrect when external workbenches were added
2021-02-05 13:22:00 +01:00
Chris Hennes
d5b68febbb Add Workbench name as Tab item tooltip
In cases where the user's font is large or the Workbench name is long,
the new, narrower sidebar may not display the entire workbench name. To
address those cases, the tooltip for the element is now also set to the
workbench name. Thanks to Github user @marioalexis84 for the suggestion.
2021-02-04 19:40:31 +01:00
Chris Hennes
13e2f93bae Fix bug due to early return
Github user @marioalexis84 found a bug that caused only the first page
of the most recently-added workbench to show. This refactors the
AddPage() static function to eliminate the early return statement that
was the cause of that bug.
2021-02-04 19:40:13 +01:00
Chris Hennes
bd8a3c5021 Add pref window that loads unloaded workbenches
A new group is added to the Preferences window that explains why
some preferences may appear to be missing due to the workbench being
unloaded. It lists the unloaded workbenches, and offers to load them,
updating the preferences dialog as necessary.

This at least partially resolves issue #4474.
2021-02-04 19:38:57 +01:00
Chris Hennes
e3f8847450 Conformed to FreeCAD coding conventions 2021-02-04 15:17:43 +01:00
Chris Hennes
dc09810e98 Check for filename before selecting
Correct an error caught by @davidosterberg -- the non-native QFileDialog did
not behave as expected when not provided with a default filename, so that case
is now caught and the `selectFile()` call is bypassed.
2021-02-04 15:17:43 +01:00
Chris Hennes
48fca8c2bc Add default filename for exports
When exporting a single file, the filename defaults to the current FCStd
name plus a dash and the name of the object. If multiple objects are
selected, the default is the basename of the FCStd file. No extension is
added. This behavior is controllable via two hidden preferences,
BaseApp/Preferences/General/ExportDefaultFilenameSingle
BaseApp/Preferences/General/ExportDefaultFilenameMultiple

_Allow regeneration of default on new exports_

If an export has been done and it used the default filename, on the next
export regenerate the filename (potentially updating the selected object
name in that filename) instead of just defaulting to the last name.

_Search for extension in chosen filter first_

Originally the file dialog simply searched for the first available extension
in the overall filter list. This commit modifies it to first check the
selected extension, and only if that is empty to search the full filter
list. This section of code only runs if a default filename is set but
does not have an extension ("suffix" in Qt's terms).
2021-02-04 15:17:43 +01:00
wmayer
222145993d Gui: [skip ci] restore tab order in selection settings page 2021-02-03 21:56:43 +01:00
Benjamin Nauck
05c61e349a Gui: Add support for selecting multiple objects without keyboard
Adds checkboxes to the document tree which makes it possible to
select multiple document objects on devices without physical keyboard.

These checkboxes are opt-in and can be enabled/disabled from:
Edit -> Preferences -> Display -> Navigation -> Selection

Forum thread for feature the request:
https://forum.freecadweb.org/viewtopic.php?f=34&t=53065

We need to iterate the tree to add/remove the selection boxes when
the enable-setting has been changed.

The size for the first column in the tree is adjusted to fit both
name and optional checkbox.
2021-02-03 21:51:56 +01:00
wmayer
d73ccbdba0 Gui: add preferences tab for selection 2021-02-03 18:06:55 +01:00
Chris Hennes
5e07d708db Remove extraneous lines from export
Corrects a merge issue from an earlier PR: the removed lines are
redundant.
2021-02-01 13:38:21 +01:00
Zheng, Lei
bead9bb938 Gui: sync recent action file list from external modification 2021-01-31 18:14:18 +01:00
Stefan Tröger
446ce21517 Remove ExtensionProxy and rely on default Python proxy for extensions. fixes #0004534 2021-01-30 16:00:48 +01:00
Kurt Kremitzki
ce8b96bada Merge branch 'master' into addImportExportRecentFilesPrefs 2021-01-29 19:02:21 -06:00
wmayer
aa45875a2b Gui: modernize C++ 2021-01-28 16:22:40 +01:00
vosk
b49c523a54 [Part] - Fix View3DInventor.setCamera leaking SoCamera* 2021-01-28 16:17:33 +01:00
vosk
4bd5c2669d [Part] - Fix memory leaks 2021-01-28 15:45:00 +01:00
Benjamin Nauck
6870b02210 [Gui] Make inventor markers symmetric
These changes makes the round markers symmetric horizontally, vertically
and on the diagonal.
2021-01-28 14:54:05 +01:00
Chris Hennes
70d81c0e1c Merge branch 'master' into addImportExportRecentFilesPrefs 2021-01-27 10:36:47 -06:00
wmayer
8113794e75 Win32: [skip ci] disable logging again as regression of support of Plus XT model has been fixed 2021-01-25 15:00:16 +01:00
Abdullah Tahiri
305fb03c0d App/Gui: New restoreError Document status and Gui pop-up
========================================================

If the restore of Document.xml results in invalid Document.xml (because unhandled exceptions occurred), the
document status Document::restoreError is set. The GUI or Mod/Web if a link was clicked, show a pop-up indicating
this situation.

This commit also shows an appropriate pop-up for the partialRestore when opening from the menu, that before only
appeared when opening by clicking a link.
2021-01-24 16:43:20 +01:00
bitacovir
078790268f Add SVG icon for Std Windows command 2021-01-23 19:44:40 +01:00
wmayer
3ed1248164 Gui: [skip ci] drop the hard limit of 50 allowed workbenches 2021-01-21 16:42:04 +01:00
wmayer
4af6c5a13e Gui: [skip ci] update standard cursors of 3d view when device pixel ratio changes (e.g. by moving between standard and high DPI monitor) 2021-01-19 19:19:30 +01:00
marioalexis
00822b0a80 Gui: Prevent crash when trying to access sub-objects of a deleted object from a SelectionObject 2021-01-18 19:46:03 +01:00
wmayer
254ed951f9 Gui: [skip ci] must set device pixel ratio to QBitmaps on Windows when using for cursor as otherwise garbage is shown 2021-01-18 15:20:57 +01:00
wmayer
9aecf36f7e Win32: [skip ci] fix support of SpaceMouse Plus XT 2021-01-13 15:15:25 +01:00
wmayer
ddaa29d114 Win32: [skip ci] enable logging for SpaceMouse input events to figure out why Plus XT model stopped working 2021-01-11 13:51:19 +01:00
Chris Hennes
636add044b Add parameters to user.cfg file when used
The two parameters are now added to the user.cfg file once they are
accessed in the code. So the first time you export a file, the
parameeter RecentIncludesExported is created and defaulted to false, and
the first time you import a file the parameter RecentIncludesImported is
created and defaults to true. Once that is done the parameters can be
edited from the Parameter Editor, even though they do not have entries
in the Preferences dialog.
2021-01-10 15:40:10 -06:00
Chris Hennes
e8cc4f1ede Merge branch 'master' into addImportExportRecentFilesPrefs 2021-01-10 13:17:29 -06:00
marioalexis
1bfd7644b2 Gui: Prevent crash when trying to access a deleted object from a SelectionObject 2021-01-07 14:06:54 +01:00
Yorik van Havre
94767d4622 Merge pull request #4249 from donovaly/GUI-icon-fix
[GUI] fix missing Std_AxisCross icon
2021-01-07 11:49:43 +01:00
Abdullah Tahiri
87c9f83bd6 Gui: Colorful/Greyable overlay status in icons
===============================================

Before this implementation, specific status via former mergeOverlayIcon() was greyed out
with the visibility.

With this commit, the developer has two options:

a) override mergeGreyableOverlayIcons, in which case the overlay will
be greyed out when the item is greyed out as per former mergeOverlayIcon()

b) override mergeColorfulOverlayIcons, in which case the overlay will
be superimposed after the icon is greyed out as it is the case for stardard
error and recompute flags.
2021-01-06 13:54:00 +01:00
donovaly
5eaa4f04c3 [GUI] fix missing Std_AxisCross icon
in commit 7587658ae3 the icon was not also added to the used Std_AxisCross menu entry
2021-01-06 01:41:01 +01:00
bitacovir
58cf466b39 Add SVG icons for eight Std View commands 2021-01-05 16:14:57 +01:00
Mateusz Skowroński
294a2ebc9d Fix Qt deprecation warnings. QPrinter::paperSize() and QPrinter::setPaperSize() are obsolete. 2021-01-04 13:40:58 +01:00
Yorik van Havre
5fca0232d7 Merge pull request #4236 from bitacovir/New_Std_View_Icons1
Add SVG icons of eight Std View menu commands
2021-01-04 12:31:46 +01:00
Yorik van Havre
5803784377 Merge pull request #4242 from realthunder/HelpDonate
Gui: add 'Donate' to Help menu
2021-01-04 12:05:16 +01:00
Zheng, Lei
3ea1486071 Gui: fix external edit reset crash
By making sure to signal from the owner document of the editing object.
The owner document of the editing object may be different from the
editing document in case of editing external linked object.
2021-01-04 12:01:00 +01:00
Zheng, Lei
d45122f45f Gui: add 'Donate' to Help menu 2021-01-04 10:43:37 +08:00
Mateusz Skowroński
712f6c1251 Fix Qt deprecation warnings. QPrinter::orientation() and QPrinter::setOrientation() are obsolete. 2021-01-03 15:08:10 +01:00
bitacovir
7587658ae3 Add SVG icons of eight Std View menu commands 2021-01-02 11:55:58 -03:00
Mateusz Skowroński
e6032b7d53 Fix Qt deprecation warnings. QPrinter::paperRect() and QPrinter::pageRect() are obsolete. 2021-01-02 10:39:16 +01:00
wmayer
f9bcfada1a Gui: [skip ci] re-add removed SVG icon, remove duplicate entry 2020-12-31 12:52:06 +01:00
bitacovir
75f78f9407 Replace SVG icons of six Std View commands 2020-12-30 20:38:03 +01:00
wmayer
0f31c87cc9 Boost: [skip ci] Fix build warnings from deprecated Boost headers (v1.75) 2020-12-29 15:34:25 +01:00
Mateusz Skowroński
2559f2d29c Fix build warnings from deprecated Boost headers (they are used internally by Boost). Thanks @wwmayer for the hint. 2020-12-29 10:20:53 +01:00
luz paz
472168fc15 Fix typos [skip ci]
Typos ffound via `codespell v2.1.dev0`  
Also includes fixes in deprecated code of `src/Mod/Assembly`
2020-12-28 23:14:04 +01:00