Commit Graph

118 Commits

Author SHA1 Message Date
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
wmayer
021e0a192f Gui: fix SelectionSingleton::sHasSelection 2023-11-24 15:06:00 +01:00
wmayer
6132d8ee63 Gui: remove code duplication of printing preselection 2023-11-20 21:44:05 -06:00
Paddle
ec305a93e0 Status bar message : reduce number of decimals to use system preference. 2023-11-20 11:02:00 -06:00
Paddle
346d0d7231 Core: Selection : Add possibility to set the style of selection between normal and greedy 2023-09-19 00:08:39 +02:00
wmayer
a86c0b8928 Gui: fix crash with the move to the new-style of class SelectionFilterPy
When setting the selection filter below and hovering over an object causes a segmentation fault:
filter = Gui.Selection.Filter('SELECT Part::Feature')
Gui.Selection.addSelectionGate(filter)
2023-08-30 15:09:08 +02:00
Chris Hennes
3d7441c2a5 Gui: Wrap PyArg_ParseTupleAndKeywords 2023-08-25 15:34:26 -05:00
wmayer
6beace8da6 Gui: modernize C++: use default member init 2023-08-23 19:51:44 +02:00
wmayer
888a33917d Gui: modernize C++: use equals default 2023-08-20 18:12:43 +02:00
wmayer
fa8978ce99 Gui: modernize C++: return braced init list 2023-08-18 00:36:24 +02:00
marioalexis
53844f7fe8 Gui: Change SelectionFilterPy to new PyCXX extension type 2023-08-16 08:39:14 +02:00
wmayer
e09d8aaba6 Gui: modernize C++: use range-based for loop 2023-08-14 19:42:18 +02:00
wmayer
948cbfccd9 modernize C++: avoid bind
In many cases std::bind() is kept because the code is much simpler
2023-08-08 21:10:16 +02:00
wmayer
52e1c7c33b modernize C++: move from boost::bind to std::bind 2023-08-08 17:36:13 +02:00
wmayer
7a3106d31b modernize C++: use bool literals 2023-08-06 01:35:39 +02:00
wmayer
d038801aca Gui: move class SelectionObserverPython to its own source files 2022-11-22 15:44:26 +01:00
wmayer
31da72fa17 Gui: change Selection.getCompleteSelection() to return a list of SelectionObject instead of DocumentObject 2022-09-29 17:13:56 +02:00
marioalexis
6bff8ee833 Gui: Check Python types using Base::PyTypeCheck 2022-09-24 05:10:34 +02:00
marioalexis
ff1b4eff05 Gui: Replace C cast 2022-09-18 11:06:51 -05:00
berniev
ae53c9b0a4 Gui: Use auto and range-based for (#7481)
* 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
2022-09-14 13:25:13 -05:00
berniev
3d1f70765a Gui: redundant void 2 2022-08-08 10:21:44 +02:00
berniev
2db561561e Gui: use empty 2022-08-06 16:35:45 +02:00
berniev
066656f62a Gui: use emplace_back 2022-08-05 10:33:41 +02:00
Uwe
d5b227e6a6 [Gui] remove more superfluous nullptr checks 2022-07-18 03:34:22 +02:00
Uwe
bb2b49fb1f [Gui] remove superfluous nullptr checks 2022-07-18 03:17:42 +02:00
andrea
7886d3cbf4 Remove unused code into GUI 2022-07-17 03:53:11 +02:00
wmayer
ab6c75fad9 Core: replace PyObject_IsTrue with Base::asBoolean 2022-07-16 14:04:05 +02:00
marioalexis
ae56fb62a7 Gui: Use PyObject_IsTrue in combination with conditional ternary operator 2022-06-22 19:50:03 -04:00
wmayer
c84c2fb6eb Gui: clean-up Selection API
Replace the int of the SubType of SelectionChanges with an enum class.
The meaning of it is nowhere documented and some magic numbers like 0,1,2 are used in several places in the code.
2022-04-09 23:07:02 +02:00
wmayer
6f2167e0f2 Gui: add enum class to Selection Python API 2022-04-09 18:03:45 +02:00
wmayer
0b2c73cf32 Gui: clean-up Selection API
Replace the int of the 'resolve' argument of several functions with a proper enum class.
* This avoids the inconsistencies in client code where often true/false is passed when an int is expected
* This avoids the use of magic numbers like 0, 1, 2 or the undocumented 3
2022-04-09 17:03:43 +02:00
Chris Hennes
5df3dbae6f Gui: PR6497 move return statement to new line 2022-03-29 12:33:50 -05:00
wmayer
1178df06b4 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
wmayer
e4d1ed8366 Base: rename BaseExceptionFreeCADError to PyExc_FC_GeneralError 2022-03-17 14:45:48 +01:00
wmayer
1f12dca2b4 Py: replace BaseExceptionFreeCADError with more suitable exception types 2022-03-17 13:54:23 +01:00
Uwe
99191c6679 [Gui] So headers: remove unused includes
- also sort out some headers to be used in precompiled headers
- also move a boost header to precompiled headers
2022-03-16 02:01:32 +01:00
wmayer
8f786ea6ef Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
Uwe
7184f2b93b [Gui] Selection: remove unused includes 2022-03-05 04:21:58 +01:00
Uwe
a8c912d6f8 [App] Expression and Extension: remove unused includes 2022-02-25 18:06:57 +01:00
Uwe
60bbd420ee [Gui] Selection and MainWindow: remove unused headers 2022-02-19 04:55:50 +01:00
marioalexis
7cc5cc8d74 Gui: Fix some docstrings in Selection module 2022-01-29 23:53:33 +01:00
marioalexis
9f1a62da29 Gui: Change signature in some Python Selection module functions 2022-01-29 11:09:33 +01:00
marioalexis
4b0067e3f0 Gui: Improve docstrings of Python Selection module functions 2022-01-29 11:09:33 +01:00
wmayer
a6838cf58f Gui: rename methods of SelectionObserver to clarify intention in client code 2021-12-07 14:17:07 +01:00
flachyjoe
30d277b27a format Selection API doc 2021-05-13 13:10:40 +02:00
luz paz
a213071c87 Gui: remove Py2 code from several src/Gui .cpp files 2021-04-14 14:56:02 +02:00
luz paz
38815b9550 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
050b20fa30 Part: [skip ci] fix crash when closing document while face colors panel is open 2020-08-06 11:26:24 +02:00
wmayer
45e0673645 LGTM: [skip ci] fix: Declaration hides parameter
A local variable hides a parameter. This may be confusing. Consider renaming one of them.
2020-07-27 10:57:34 +02:00
wmayer
9b2a6edeb0 Coverity: Uncaught exception 2020-07-20 17:34:29 +02:00