Commit Graph

5292 Commits

Author SHA1 Message Date
wmayer
0ed7eb5652 Gui: use of TaskDialog::addTaskBox 2024-03-26 15:57:20 +01:00
wmayer
bc9d845296 Gui: extend and add overloaded method of TaskDialog::addTaskBox 2024-03-26 15:57:20 +01:00
Chris Hennes
ba8250e3fd Add QOffscreenSurface to QtAll.h 2024-03-26 07:33:43 +01:00
sliptonic
fffbff0ff0 Merge pull request #12948 from wwmayer/issue_5609
Fixes #5609: Add MSAA 6x option
2024-03-25 12:27:58 -05:00
Florian Foinant-Willig
edbab63c91 [Gui] Allow to create ExpLineEdit with python 2024-03-23 10:19:16 +01:00
wmayer
1cfad41422 Gui: clear the title bar after closing the last MDI window 2024-03-22 16:08:44 +01:00
wmayer
1dad1b3718 Fixes #11861: Gui::PrefUnitSpinBox requires restart after unit system change
This fixes a regression of PR #11266 that dropped the case where neither the option 'Ignore project unit system and use the default' is set
nor an active document exists. In this case nothing happens even if the user changed the unit system.
2024-03-22 09:40:13 +01:00
wmayer
f5baef888c Gui: fix several regressions caused by PR #12035
* fix hard crash in MainWindow::_updateActions() if no MDI view exists
* in MDIView::buildWindowTitle() use the label of the document because this changes when saving it while the name is immutable
* fix const correctness in MDIView::buildWindowTitle()
* do not set the modified flag of the main window in MDIView::buildWindowTitle() but in the calling instance
* move setting the main window title to Application::viewActivated to reduce code duplication
* fix missing application name if FreeCADGui is loaded as Python module
2024-03-18 23:27:51 +01:00
luzpaz
5839134e95 Fix various typos throughout the codebase (#13029)
* Fix various typos throughout the codebase

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-18 16:54:30 -05:00
PaddleStroke
b3fe5bba28 Sketcher: Chamfer tool (and fillet refactor) 2024-03-18 13:23:54 -04:00
sliptonic
5c81e7bd89 Merge pull request #12878 from maxwxyz/view-command-group
UI/UX: Create a toolbar command group for default views
2024-03-18 11:21:32 -06:00
PaddleStroke
555d06e875 Navicube : Add missing 'Fit selection' menu entry. 2024-03-18 17:37:40 +01:00
Max Wilfinger
241ce40b5f use setWindowModified() to indicate modified state and window title 2024-03-18 17:36:20 +01:00
Max Wilfinger
b4ad517ed6 display current active document in main window title 2024-03-18 17:36:20 +01:00
wmayer
61fded281b Gui: fixes #12891: Random color not working for App::Part 2024-03-16 09:46:06 +01:00
wmayer
1e9d6698b7 Gui: fixes #5609: Add MSAA 6x option 2024-03-14 11:41:33 +01:00
wmayer
80974bc503 Gui: refactor DlgSettings3DViewImp and fix some linter warnings 2024-03-14 10:10:53 +01:00
Chris Hennes
918bcb7f5b Gui: Remove trailing spaces from translations 2024-03-12 22:42:19 -05:00
Max Wilfinger
62eb03aebe Create a toolbar command group for default views.
Optional toolbar for all individual views is available.
2024-03-12 16:03:59 +01:00
Florian Foinant-Willig
0625ac026d Core: Fix unselectable area in SoDatumLabel 2024-03-11 12:24:00 -05:00
André Althaus
2224d87e6e Fix #12780: An additional visibility icon is shown for features in groups
The icons in the testStatus() function are taken by reference and modified
inside. This seems to be used for caching when the same item occurs
multiple times in the tree. This can be the case for groups.

The visibility icon was added without taking the cached icon into
consideration and so it was added a second time.
The code is now moved into the if statement checking for this case.
2024-03-11 12:23:04 -05:00
wmayer
2cdc94e15c Gui: Fix using context-menu of ExpressionLineEdit
If for the DlgExpressionInput the user config parameter 'NoSystemBsckground' is set to True it's not used as a normal dialog but as a pop-up window.
In this mode the context-menu of the ExpressionLineEdit isn't working. A previous commit (a3036d16f1) fixed a crash but not this issue.

For Qt4 DlgExpressionInput has overridden the eventFilter() to handle using the context-menu but this is not working any more for Qt5 or Qt6.
Luckily, it has appeared that with Qt5 and Qt6 it works out-of-the box now and the event filter is not needed any more.
2024-03-11 16:04:00 +01:00
xtemp09
a3036d16f1 Fix the crash described in #12785
Closes #12785. The cause of the segmentation fault is access to the
already deleted _QMenu_. Simple setting attribute `Qt::WA_DeleteOnClose`
and removal of `delete menu` prevented it. To reproduce the crash, one
needs to mess up the `user.cfg` file in the way described in the issue.

Here is the fragment from the issue to mess up the `user.cfg` file:

```xml
<FCParamGroup Name="Expression">
<FCText Name="EditorTrigger">=</FCText>
<FCBool Name="AntoHideEditorIcon" Value="1"/>
<FCBool Name="NoSystemBackground" Value="1"/>
<FCInt Name="EditDialogBGAlpha" Value="1"/>
<FCInt Name="EditDialogWidth" Value="300"/>
<FCInt Name="EditDialogHeight" Value="214"/>
<FCInt Name="EditDialogTextHeight" Value="35"/>
</FCParamGroup>
```

---

This commit changes also unconnected things:

- usage of `QObject::connect` instead of if statements
- relocation of a separator and an action inside the if statement (I saw
no reason to have a separator and an action for _ExpressionCompleter_ if
there is no expression completer)
- usage of asynchronous `QMenu::popup()` instead of synchronous
`QMenu::exec()`. This way is used within [the source code of Qt]
(https://github.com/qt/qtbase/blob/5.15/src/widgets/widgets/
qlineedit.cpp#L2191-L2197).
2024-03-09 16:12:47 +01:00
Chris Hennes
da36c0c1f3 Merge pull request #12066 from 3x380V/time_cleanup
Base: Use std::chrono for time manipulation
2024-03-05 15:47:33 -06:00
WandererFan
2e8473b659 Merge pull request #12749 from pavltom/techdraw_leaderline_linking
[TechDraw] Reimplement Leader Line parent linking
2024-03-05 12:50:09 -05:00
Yorik van Havre
1e164f24c0 Translations (#12748)
* Updated ts files

* Merged crowdin translations

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-05 08:54:36 -06:00
wmayer
c4e1495d81 Gui: fix -Wlogical-op-parentheses 2024-03-05 08:34:19 -06:00
Ladislav Michl
1677e3d105 Base: Remove StopWatch
StopWatch is now used on single place only, remove it in favour of TimeElapsed
2024-03-05 12:30:56 +01:00
Ladislav Michl
e4d304f934 Base: Implement TimeElapsed
Some instances of TimeInfo serve the sole purpose of measuring time
duration. Using system time is unfortunate as it returns wall clock,
which is not guaranteed to be monotonic. Replace such a usage with
the new TimeElapsed class based on steady clock.
2024-03-05 12:29:24 +01:00
Chris Hennes
672d879653 Gui: Fix translation strings for Part, Group, and Link
Extra HTML tags were added outside the translation NOOP. They were unnecessary, and broke translation.
2024-03-05 10:38:51 +01:00
WandererFan
ce90c89b54 Merge branch 'main' into techdraw_leaderline_linking 2024-03-04 15:34:48 -05:00
wmayer
4732cbf3b9 Gui: fix -Wlogical-op-parentheses 2024-03-04 11:23:09 -06:00
Bas Ruigrok
14cbd1716b Gui: Set rotation center when entering dragging in TinkerCAD style 2024-03-04 11:09:04 -06:00
pavltom
9b9086aeb4 Switch to correct page when changing Link property target - add comments 2024-03-04 18:00:41 +01:00
Florian Foinant-Willig
f633fa476a Introduce object freeze (#12580)
* Introduce object freeze

* do nothing at property change
2024-03-04 17:54:25 +01:00
LemonBoy
1bcefaf9b1 GUI: Follow the widget indications when docking them (#12530)
* GUI: Follow the widget indications when docking them

The overlay manager handles the creation and drawing of the title bars
for the docked widgets. When adding a QDockWidget the manager ignored
the set of features (closable, movable, floatable) provided by the
widget and always showed all the actions.

Amend the code to take into account the features specified by the
widget.

Closes #11944
2024-03-04 10:41:55 -06:00
Chris Hennes
15b3b1d5dd Merge pull request #12205 from Rexbas/animation-easing
Gui: Add easing to navigation animations
2024-03-04 10:37:06 -06:00
pavltom
04335d4060 Switch to correct page when changing Link property target 2024-03-04 15:39:48 +01:00
wmayer
cc8fbf83e7 Gui: Enable SoModelMatrixElement
The element type SoModelMatrixElement must be enabled for the node types SoHighlightElementAction and SoSelectionElementAction.
Otherwise an assert() will fail and causes a crash in debug mode.
2024-03-04 11:24:39 +01:00
Ladislav Michl
0420f72ca0 Gui: PythonWrapper: Consolidate typeName handling
Use typeName consistently for both PySide and Python interface
code paths.
2024-03-03 15:20:48 +01:00
wmayer
866909e2f6 Gui: PythonWrapper: Make qt_getCppType more robust
Handle gracefully possible shiboken's Python API changes.
2024-03-03 15:20:48 +01:00
wmayer
26dedb03ce Gui: PythonWrapper: Fix possible crash in qt_wrapInstance 2024-03-03 15:20:48 +01:00
Ladislav Michl
a11d8710c1 Gui: PythonWrapper: Use getPyTypeObjectForTypeName consistently 2024-03-03 15:20:48 +01:00
Ladislav Michl
769d14a1f1 Gui: PythonWrapper: Raise exception on qt_wrapInstance failure
When qt_wrapInstance fails it returns Py::Object with internal
pointer set to null. Make PythonWrapper::from* methods raise
exception when this happens to be consistent with PySide code path.
2024-03-03 15:20:48 +01:00
Ladislav Michl
da64119797 Gui: Implement PythonWrapper::fromQAction
Wrapping QAction through QObject does not work as QAction class
is a part of QtGui not QtCore, so Py::Object with internal
pointer being null is returned causing a crash later.
Therefore implement fromQAction conversion method.
2024-03-03 15:20:48 +01:00
Max Wilfinger
31b12ae9e2 remove code block quotes from about info 2024-03-03 12:08:12 +01:00
Chris Hennes
b6c8f8d460 Update translations 2024-02-29 17:25:46 -06:00
Rexbas
7e2f8c3056 Gui: Add easing to navigation animations 2024-02-29 13:29:37 -06:00
Rexbas
5e3425f753 Gui: Set default navigation animation duration to 500 ms 2024-02-29 13:29:37 -06:00
PaddleStroke
57a83955cb Fix ViewProviderSuppressibleExtension 2024-02-27 15:05:50 +01:00