Commit Graph

5143 Commits

Author SHA1 Message Date
Yorik van Havre
651fc54a8c merged crowdin translations 2023-12-20 09:27:37 +01:00
Yorik van Havre
1f65348080 Updated ts files 2023-12-20 09:27:37 +01:00
Yorik van Havre
1942891156 Restored deleted explanatory code 2023-12-19 14:26:05 +01:00
mos
243acce4e6 Removed redundant float casts
fix cast promotions
2023-12-19 14:26:05 +01:00
Kacper Donat
34c85e26da Gui: Allow ActionGroups to not remember choice
This is fix to issue mentioned in the #11717, on discord and forum that
for smart dimension tool the chosen tool should not be remembered. This
will ensure that the "smart" tool is always visible on the toolbar and
other tools are accessible in case that such explicit choice is needed.
2023-12-18 17:51:48 +01:00
Zheng, Lei
15e42a9b87 Gui: fix group visibility toggle
Fixes #9277
2023-12-18 17:20:45 +01:00
Stanislav Meduna
8428b90c14 fix compatibility with current Mac 3Dconnexion driver 2023-12-18 00:15:52 -06:00
hlorus
f0f9e81f88 Simplify dragging of App::AnnotationLabel (#11602)
* ViewProviderAnnotationn: Always allow dragging

Removes the editmode

* ViewProviderAnnotation: Use the label as transformation handle

* ViewProviderAnnotationn: Always allow dragging

Removes the editmode

* ViewProviderAnnotation: Use the label as transformation handle

* ViewProviderAnnotation: Hide dragger feedback during translation

---------

Co-authored-by: WandererFan <WandererFan@gmail.com>
2023-12-11 14:18:27 -05:00
Roy-043
53ff79215c Gui: MarkerBitmaps fix DIAMOND_FILLED_20_20
Also made DIAMOND_FILLED_25_25 sharper.

See: https://github.com/FreeCAD/FreeCAD/pull/11524#issuecomment-1847906082
2023-12-11 18:23:41 +01:00
sliptonic
6ed5d3bc8b Merge pull request #11670 from mwganson/macroexecute
[Core][MacroExecuteDialog]File chooser should be folder chooser for s…
2023-12-11 11:10:28 -06:00
André Caldas
89dbab9b0e Avoids using getNameInDocument() to test if DocumentObject is attached to a Document.
This patch substitutes by isAttachedToDocument() (almost) everywhere where
getNameInDocument() is used for this purpose.

The very few places not touched by this patch demand a (just a little) less trivial change.
When we change the returning type of getNameInDocument() to std::string,
those places will be easily found, because they shall generate a compiler error
(converting std::string to bool).

Rationale:
The fact that getNameInDocument() return nullptr to indicate
that the object is not attached to a document is responsible for lots of bugs
where the developer does not check for "nullptr".

The idea is to eliminate all those uses of getNameInDocument() and, in the near future,
make getNameInDocument() return always a valid std::string.
2023-12-11 17:37:58 +01:00
Abdullah Tahiri
56377cd09e NotificationArea: Fix Lints 2023-12-09 11:06:04 +01:00
Abdullah Tahiri
a63540e845 Notification Area: Group same message under a single line
=========================================================

issue #11183

Feature request.

Instead of repeating over and over again the same message, indicate the number of consecutive repetitions in a single message.
2023-12-09 11:06:04 +01:00
Syres916
94b201309e [TechDraw] Collect doc info to fill template fields 2023-12-07 19:55:01 -05:00
mwganson
2ee3138233 [Core][MacroExecuteDialog]File chooser should be folder chooser for selecting user macro directory 2023-12-06 12:34:13 -06:00
David Carter
3dd6a67804 Material: Material editor enhancements
Continues the work of the material subsystem improvements.

This merge covers the continued development of the material editor. The
primary improvements are the addition of new data types, a new
appearance preview UI, and changes in the array data types.

New data types were added to support more advanced workflows, such as
the Render Workbench.The Image datatype allows the material to embed
the image in the card instead of pointing to an image in an external
file. Multi-buyte strings span multiple lines as the name implies.
It preserves formatting accross those lines. Also several list types
are now supported, with the primary difference being the editors.
List is a list of strings, FileList is a list of file path names, and
ImageList is a list of embedded images.

For the appearance preview, the UI now uses the same Coin library as
is used in the documents, meaning the preview will look exactly the
same as the material will be shown in the documents.

The array data types are now more complete. The default value wasn't
being used as originially envisioned and was tehrefore removed. For
3D arrays, the Python API was implemented.

There were a lot of code clean ups. This involved removing logging
statements used for debugging during development, reduction of lint
warnings, and code refactoring.

The editor can automatically convert from previous format files to the
current format. This has been extended to material files generated by
the Render WB. Old format files are displayed in the editor with a
warning icon. Selecting one will require saving the file in the new
format before it can be used.
2023-12-06 08:48:34 -06:00
bgbsww
c2bab7a2fa Move the unit schema into Project Information and remove all Project Unit System code (#11266)
* Add unit system to Project Information and store with document.

* Remove the project unit system

* Restore correct document activation signalling to fix test fail

* Remove commented out dead lines

* Restore ignore option for project unit schemas

* Whitespace fix

* Refresh after changing units

* Remove field label

* Property editor changes applied to unit system
2023-12-04 13:04:53 -06:00
Kacper Donat
5f97079a33 Gui: Cap starting height of Preferences dialog
This commit ensures that preference windows does not start taller than available geometry.
2023-12-04 11:03:35 -06:00
wmayer
f8c3e5505a Gui: fix several lint warnings 2023-12-04 10:53:51 -06:00
wmayer
e8d6955908 Gui: refactor FCSphereSheetProjector 2023-12-04 10:53:51 -06:00
Bas Ruigrok
ea8b5b4b39 Gui: Add a separate checkbox for enabling spinning animations (#11534)
* Gui: Create group box for animation preferences

* Gui: Add spinning animation checkbox

* Gui: Implement isAnimating() for NavigationAnimator

* Gui: No need to enable animations in DemoMode

The spin animation is played regardless of the user preference and does not need to be enabled before starting the spin animation

* Gui: Change comment
2023-12-04 10:50:29 -06:00
Chris Hennes
b70eb6a173 Merge pull request #11507 from Ondsel-Development/constr_primitives
[Sketcher] Improve angle & radius constraint rendering
2023-12-04 10:48:20 -06:00
MisterMaker
48d4a74923 [Stylesheets] Fix for new settings menu (#11609)
It can probably use some more tweaks but this way it is bug free.
2023-12-04 11:44:05 -03:00
bdieterm
2c5e1a9382 Gui: fix partially initialized default transparency 2023-12-01 12:36:31 +01:00
Kacper Donat
afd72f3585 Gui: Add ability to easily lock Toolbars from UI
This adds the Std_ToggleToolBarLock action mentioned in #4992. It is
exposed in the context menu of toolbar and also in the view -> toolbars
app menu.
2023-12-01 12:13:43 +01:00
wmayer
0b86976bf4 Gui: simplify Application::sGetMarkerIndex 2023-11-30 15:26:43 +01:00
luzpaz
5c21351608 Fix various typos 2023-11-30 14:58:06 +01:00
wmayer
3214ca644f Gui: fix several lint warnings 2023-11-29 21:10:49 +01:00
Syres916
b00cca788d [Gui] Add HourGlass markers including larger sizes 2023-11-28 23:55:10 +01:00
Paddle
aa9708b46e Core: Hide macro toolbar by default. 2023-11-28 23:46:29 +01:00
wmayer
19dfea4783 MSYS: fix broken Qt6 build using MinGW & clang 2023-11-28 19:11:58 +01:00
wmayer
9fb08b887d fixes #11533: TypeError in: FreeCADGui.getMainWindow().windowStateChanged 2023-11-27 11:30:41 -06:00
Yorik van Havre
fac94ba932 Translations (#11551)
* 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>
2023-11-27 11:29:38 -06:00
Chris Hennes
5746b059c0 Merge pull request #11540 from kadet1090/rework-preferences-navigation
Gui: Add ScrollArea to Preferences and auto expand groups
2023-11-27 11:20:48 -06:00
Chris Hennes
3ebf841300 Merge pull request #11519 from Rexbas/rotation-center-zoom
Gui: Update rotation center indicator after zoom
2023-11-27 11:08:42 -06:00
wmayer
79b21080e6 Gui: fix drag and drop of ViewProvider
* ViewProvider::canDragAndDropObject should only return true if an extension handles drag and drop
  Currently it returns true if no extension is available
* ViewProvider::dropObject shouldn't throw an exception if no extension handles drag and drop

As an example consider https://forum.freecad.org/viewtopic.php?t=82957
When selecting two objects then ViewProvider::dropObject is called twice. But for the first call both objects are moved to the destination
and for the second call no extension handles drag and drop any more. This incorrectly leads to a thrown exception.
2023-11-27 11:07:29 -06:00
Chris Hennes
cfd41683a5 Core: Enable compiling with MSVC /permissive- (#11014)
* Base: Fixes for MSVC permissive-

* App: Fixes for MSVC permissive-

* Gui: Fixes for MSVC permissive-

* Main: Fixes for MSVC permissive-

* Fem: Fixes for MSVC permissive-

* Material: Fixes for MSVC permissive-

* Part: Fixes for MSVC permissive-

* Mesh: Fixes for MSVC permissive-

* Points: Fixes for MSVC permissive-

* Robot: Fixes for MSVC permissive-

* TechDraw: Fixes for MSVC permissive-

* Path: Fixes for MSVC permissive-

* Core; Changes per review comments

* TD: Revision from wandererfan

* [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>
2023-11-27 17:37:29 +01:00
Kacper Donat
593f1a2386 Gui: Expand group after selection
This commit ensures that after selecting item the group is automatically
expanded. User can force expansion by explcitly clicking expand button,
groups expanded that way will stay expanded unless user collapses them.
Otherwise non-active group will be collapsed automatically.
2023-11-26 20:25:06 +01:00
Kacper Donat
42aebdfa97 Gui: Add ScrollArea to Preferences
This adds QScrollArea widget to DlgPreferences which in turn allows
preference pages to be scrollable. Stacked widget sizes are forced to
selected widget so scroll area should appear when it is needed.

Fixes #11511
2023-11-26 16:01:22 +01:00
pavltom
b8278718e9 [TechDraw] Implement arc length calculation for arbitrary edge 2023-11-26 08:53:39 -05:00
wmayer
ec02ef0126 Gui: use MarkerBitmaps::getSupportedSizes to get available sizes 2023-11-25 18:37:26 +01:00
Syres916
0046e625f0 [Gui] Add 20, 25 and 30px marker sizes 2023-11-25 12:36:33 +01:00
Rexbas
21f10dd36b Gui: Find scene bounding sphere after zoom 2023-11-25 09:40:49 +01:00
Rexbas
affc49049e Gui: Update rotation center indicator after zoom 2023-11-24 22:43:48 +01:00
Paddle
ef2a723a32 Draw arc helpers for radius constraints. 2023-11-24 15:07:35 +01:00
Paddle
74a01c0d1b Improve angle constraint rendering. 2023-11-24 15:07:35 +01:00
wmayer
021e0a192f Gui: fix SelectionSingleton::sHasSelection 2023-11-24 15:06:00 +01:00
wmayer
0c21c6298c Base: fix google-explicit-constructor 2023-11-22 23:47:29 +01:00
wmayer
451c094f39 MSVC: fix warnings about conversion between float and double 2023-11-21 23:10:03 +01:00
wmayer
fb770778d3 Qt: fix duplicate widget names 2023-11-21 23:10:03 +01:00