Commit Graph

34641 Commits

Author SHA1 Message Date
wmayer
3ba5cd569d Gui: port new code to Qt6 2023-10-12 11:48:16 +02:00
Roy-043
5f072c9fa4 Draft: Import DXF: handle arc angles larger than 360 degrees
See #10985.
2023-10-12 10:52:30 +02:00
wmayer
b8e8b2aca8 Gui: remove trailing whitespaces (thanks luzpaz) 2023-10-12 00:58:44 +02:00
wmayer
e543840afc Gui: removing parameters from settings that affects older versions is rude 2023-10-12 00:58:44 +02:00
wmayer
9eb5fd8036 Gui: fixes OverlayManager issues
* QMetaObject::invokeMethod: No such method Gui::OverlayManager::raiseAll()
* variable 'total' set but not used [-Wunused-but-set-variable]
* 'globalPos' is deprecated: Use globalPosition() [-Wdeprecated-declarations]
2023-10-12 00:58:44 +02:00
wmayer
04af090e86 Gui: replace deprecated QDesktopWidget with QScreen
Since Qt5.11 QDesktopWidget is marked as deprecated and has been removed in Qt6. New code has to use QScreen instead.
2023-10-12 00:58:44 +02:00
wmayer
7bd4af9c68 Gui: fix tab order and duplicated widget names in DlgSettingsTheme.ui 2023-10-12 00:58:44 +02:00
Yorik van Havre
3359f6e152 Import: Support DXF text rotation (#11001)
* Import: Support DXF text rotation - fixes #10882

- Reads and supports text rotation in builtin DXF import
- Makes the builtin DXF import produce Draft texts instead of App::Annotations
- Extends the arguments of Draft make_text()

* [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-10-11 17:05:31 +02:00
wmayer
f8936185d8 Gui: fixes a problem that if executing a macro that requires user-interaction this is blocked 2023-10-11 15:19:04 +02:00
wmayer
f0d350f60d TD: fix -Wsign-compare 2023-10-11 15:12:42 +02:00
wmayer
e9cbdd208c Import: fix -Wunused-private-field 2023-10-11 15:12:42 +02:00
wmayer
6ef99e413b Tests: suppress warning about intened self-assignment 2023-10-11 15:12:42 +02:00
wmayer
9e1a495fe8 Tests: fix undefined behaviour in givenDataAsXMLStream 2023-10-11 12:05:37 +02:00
wmayer
80d8bfd4b8 Material: remove several unreferenced variables 2023-10-11 12:04:26 +02:00
wmayer
c19a8736b8 Core: fix compiler warning due to boost 2023-10-11 12:04:26 +02:00
Roy-043
7222cf575f Draft: Use DXF OCS when importing circles and arcs to Part shapes
See #10985.
2023-10-11 10:08:58 +02:00
Zheng, Lei
033f520cc5 Gui: expose various overlay UI options to preference pages 2023-10-11 09:58:53 +02:00
Zheng, Lei
ba6b2a4375 Gui: add support for transparent overlay docking widget 2023-10-11 09:58:53 +02:00
Zheng, Lei
1dd0a9afaa Gui/TechDraw: declare 'panning' capability in views
OverlayManager queries this capability to determin whether to auto hide
the overlay docking widgets
2023-10-11 09:58:53 +02:00
Chris Hennes
b3f745a034 Merge pull request #10909 from chennes/toponamingPhase3Card1
App/Toponaming: Add base64 encoding to XML
2023-10-10 12:00:53 -05:00
Chris Hennes
80be10c643 Base/Toponaming: Refactor to extract filters to new file 2023-10-10 11:28:30 -05:00
Chris Hennes
023ff7f388 App/Toponaming: Linter cleanup of Base64 code
Does not address pointer arithmetic or array indexing complaints.
2023-10-10 10:19:44 -05:00
Chris Hennes
33abb7b5b1 App/Toponaming: Add base64 encoding to XML 2023-10-10 10:19:43 -05:00
Roy-043
ddf2a3723b Arch: Fix multiple issues with ImportOBJ.py
Fixes #6187.

Other fixes:
* Made handling of shapes and global placement more consistent.
* Shapes without curves were also triangulated.
* Polygonal faces could have flipped normals and duplicate points.
2023-10-10 16:44:57 +02:00
Zheng, Lei
28bcc3d097 Gui: fix selection of nested object in App::Part 2023-10-10 14:28:26 +02:00
marioalexis
eb73a9bce0 Fem: Remove callback added by filters task box and rework marker classes 2023-10-10 13:58:34 +02:00
Paddle
019bd50bbc Fix typo making Sketcher_Dimension fails for angles. 2023-10-10 13:48:07 +02:00
wmayer
15622bb519 App: the function findLicense() uses the '==' operator to compare two C strings.
This is wrong and leads to failures under Windows.
2023-10-10 13:31:10 +02:00
wmayer
d635a0a034 Core: switch from master to main in version number script 2023-10-10 13:09:44 +02:00
wmayer
eaeec1b5d0 Gui: Initial save of a document doesn't have the expected thumbnail
When saving the thumbnail there is a check if the 3D window is the active window. This check fails if a document is saved for the first time because
the appearing file dialog causes the 3D window to not be active any more. Thus, no snapshot of the 3D window will be created and the program logo will be
saved instead. A workaround is to save the document twice.

This PR removes the check for the active window so that the snapshot can be created. The issue might be related to #10937.
2023-10-10 13:08:29 +02:00
wmayer
4388246c01 Import: fixes #10983: Crash when trying to import a DXF file with Polish letters in the name 2023-10-10 12:58:47 +02:00
Florian Foinant-Willig
dbe1c6135a Fix #10910 2023-10-09 22:54:12 +02:00
Rexbas
f1fde08b3b Gui: Fix rotation center indicator for Gesture styles 2023-10-09 22:30:05 +02:00
Haas
2f6b984d30 Update DlgSettingsWorkbenchesImp.cpp
added translucent background for workbench name/icon widget.
2023-10-09 16:42:53 +02:00
xtemp09
bce07d726a [GUI] Fix memory leak in ViewProviderPlane.cpp 2023-10-09 16:27:39 +02:00
wmayer
f7cf84c0b8 Gui: Enable the thumbnail size widget by default
With PR #10016 the saving of thumbnails is on by default but the spin box to set the size is still disabled.
This results into an inconsistency and one has to click the Save thumbnails check box twice to enable the size widget.
2023-10-09 16:23:35 +02:00
wmayer
eafe867f2a Tests: add unit tests for XMLReader::readNextElement() 2023-10-09 15:06:45 +02:00
wmayer
cab1b21880 Core: In XMLReader::readNextElement() support structure <element>data</element> 2023-10-09 15:06:45 +02:00
wmayer
3e33591093 Core: add method to XMLReader to access next element of an XML file
If the next element could be read-in successfully true is returned, and false otherwise.
2023-10-09 15:06:45 +02:00
wmayer
d305f306df Core: Revert superfluous changes made with PR #9521 2023-10-09 15:06:45 +02:00
luzpaz
22aa20c9e0 Preferences: remove whitespace before colon
Uniformity fix in the preference page
2023-10-09 14:44:42 +02:00
Roy-043
3e45d030cf Draft: Fix cursor scaling issue
Fixes #6793
2023-10-09 14:01:21 +02:00
Roy-043
1e4e58477e Arch: ArchFrame typos when checking enum values 2023-10-09 13:55:46 +02:00
wmayer
41ccf4f0c7 Start: fixes #10221: /tmp/FreeCADStartThumbnails* directories are not removed when FreeCAD terminates
The commit adds some new functions:

* getThumbnailDir()
  Returns the path to the thumbnail directory which is a sub-directory of the Cache directory.
  There is no need to always create a unique directory after each restart because it doesn't harm
  if the thumbnail directoy contains deprecated files.

* createThumbnailDir()
  Creates the thumbnail directoy if it doesn't exist yet.

* getSha1Hash
  Helper function to compute a SHA-1 hash of a given path. If the same path is passed
  then the hash value will be the same.
  This way it can be avoided to create a different image file from a project file
  after each restart.

* getUniquePNG
  Computes the path of a PNG image file for a given project file. It's also possible
  to pass an arbitrary string as argument.

* useCachedPNG
  If the PNG image exists and if it's newer than the project file True is returned
  and False otherwise.

The changes in detail are:
1. For a given project file it is checked if the thumbnail directory already contains
   a cached image. If it's newer than the project file it will used, otherwise it will
   be re-created.

2. For the system icon to a given file format it is only checked if the icon already exists.
   If yes, it will be used.
2023-10-09 13:54:11 +02:00
Roy-043
017d431720 Arch: Read and write object.Label on Wavefront OBJ import and export
Fixes #5635.
Fixes #5636.
2023-10-09 13:28:55 +02:00
Roy-043
3395b2e2f6 Draft: fix multiline offset for rotated SVG texts
Forum topic:
https://forum.freecad.org/viewtopic.php?p=711184#p711184
2023-10-09 13:27:54 +02:00
Matthew Woehlke
0a6c0cb224 Fix build for C++20
Remove template argument list from constructor names. It has never been
necessary, and is forbidden in C++20 (n.b. CWG 2237¹). This has also
been independently fixed upstream in r449².

Fixes #10952.

¹ https://cplusplus.github.io/CWG/issues/2237.html
² https://sourceforge.net/p/cxx/code/449/
2023-10-09 10:46:05 +02:00
Abdullah Tahiri
ead8a9a5d1 Sketcher: Example new type checking template function usage
===========================================================

Just two small refactor examples of how to use the type checking template functions.
2023-10-07 23:12:46 +02:00
Abdullah Tahiri
468f79b84d Base: templates for type checking
=================================

Original idea of Werner:
https://github.com/FreeCAD/FreeCAD/pull/10643#issuecomment-1712966545

I really liked this syntax to avoid repetition and even explicit consideration of Types when type checking.

I thought it would be a pitty to get it lost.
2023-10-07 23:12:46 +02:00
David Carter
b724c39c4d Material: Update Python tests to work with other locales
Update Python tests to work with other locales

This fixes issues #10917 and #10924

Numeric values were beign compared to strings that did not take into account localizations. The test was modified to work regardless of localization.

There is still a known issue when working with pt_BR.UTF8. The default encoder for this localization is not UTF8 resulting in an error working with a parameter that returned the UTF character for the Greek letter mu in its units.
2023-10-07 19:44:13 +02:00