From 5d7a2df75848f7e418aa0766e1457081eb21ba74 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 8 Dec 2020 13:17:16 +0100 Subject: [PATCH 1/8] App: [skip ci] by default disable transactions on recompute --- src/Gui/CommandDoc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Gui/CommandDoc.cpp b/src/Gui/CommandDoc.cpp index 225a26177f..bba8d391e9 100644 --- a/src/Gui/CommandDoc.cpp +++ b/src/Gui/CommandDoc.cpp @@ -1307,7 +1307,7 @@ StdCmdRefresh::StdCmdRefresh() // undoing the last transaction the manual recompute will clear the redo stack. ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( "User parameter:BaseApp/Preferences/Document"); - bool create = hGrp->GetBool("TransactionOnRecompute", true); + bool create = hGrp->GetBool("TransactionOnRecompute", false); if (!create) eType = eType | NoTransaction; } From 65ac47759f7f1995645d31360219bc2760333974 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 8 Dec 2020 19:06:09 +0100 Subject: [PATCH 2/8] [skip ci] avoid to let Coin redefine several HAVE_ macros --- src/FCConfig.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/FCConfig.h b/src/FCConfig.h index ac1c29e012..aeb476b061 100644 --- a/src/FCConfig.h +++ b/src/FCConfig.h @@ -170,6 +170,17 @@ typedef __int64 int64_t; typedef unsigned __int64 uint64_t; #endif +/* avoid to redefine the HAVE_* in Coin's inttypes.h file */ +#define COIN_CONFIGURE_BUILD +/* The header file. */ +#define HAVE_INTTYPES_H 1 +/* The header file. */ +#define HAVE_STDINT_H 1 +/* The header file. */ +#define HAVE_SYS_TYPES_H 1 +/* The header file. */ +#define HAVE_STDDEF_H 1 + #endif From 85003c7ccd01f3b46c1010270c4102145759742b Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Wed, 9 Dec 2020 11:54:35 +0100 Subject: [PATCH 3/8] Arch: Fixed typo (Awming->Awning) --- src/Mod/Arch/ArchWindowPresets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Arch/ArchWindowPresets.py b/src/Mod/Arch/ArchWindowPresets.py index 6fd3573bed..ab0f3f9ca2 100644 --- a/src/Mod/Arch/ArchWindowPresets.py +++ b/src/Mod/Arch/ArchWindowPresets.py @@ -26,7 +26,7 @@ from draftutils.translate import translate WindowPresets = ["Fixed", "Open 1-pane", "Open 2-pane", "Sash 2-pane", - "Sliding 2-pane", "Simple door", "Glass door", "Sliding 4-pane", "Awming"] + "Sliding 2-pane", "Simple door", "Glass door", "Sliding 4-pane", "Awning"] def makeWindowPreset(windowtype,width,height,h1,h2,h3,w1,w2,o1,o2,placement=None): @@ -436,7 +436,7 @@ def makeWindowPreset(windowtype,width,height,h1,h2,h3,w1,w2,o1,o2,placement=None wp.extend(["RightMostFrame","Frame","Wire8,Wire9",fw,str(o2)+"+V"]) wp.extend(["RightMostGlass","Glass panel","Wire9",str(w2/gla),str(o2+w2/2)+"+V"]) - elif windowtype == "Awming": + elif windowtype == "Awning": wp = outerFrame(s,width,height,h1,w1,o1) simpleFrame(s,width,height,h1,h2,tol) From 2fb2e1a5a84fd73a79b77b397737ccc5db3bb039 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Wed, 9 Dec 2020 14:42:50 +0100 Subject: [PATCH 4/8] Draft: Better layout of the Draft SetStyle task panel --- .../Draft/Resources/ui/TaskPanel_SetStyle.ui | 517 +++++++++--------- 1 file changed, 267 insertions(+), 250 deletions(-) diff --git a/src/Mod/Draft/Resources/ui/TaskPanel_SetStyle.ui b/src/Mod/Draft/Resources/ui/TaskPanel_SetStyle.ui index 99cfb93ea7..fa96f538e1 100644 --- a/src/Mod/Draft/Resources/ui/TaskPanel_SetStyle.ui +++ b/src/Mod/Draft/Resources/ui/TaskPanel_SetStyle.ui @@ -6,8 +6,8 @@ 0 0 - 251 - 461 + 245 + 531 @@ -15,279 +15,296 @@ - - - - - Text color - - - - - - - Shape color - - - - - - - Line width - - - - - - - The color of faces - - - - - - - The type of dimension arrows - - - - Dot + + + Lines and faces + + + + QLayout::SetDefaultConstraint + + + + + The color of faces - - + + + + - Circle + Draw style - - + + + + - Arrow + Line color - - + + + + - Tick + Line width - - + + + + + + The color of lines + + + + + + + The line style + + + + Solid + + + + + Dashed + + + + + Dotted + + + + + DashDot + + + + + + + + px + + + + + - Tick-2 + Display mode - - - - - - - The color of texts and dimension texts - - - - - - - The size of texts and dimension texts - - - - - - - - - - Show unit - - - - - - - Line color - - - - - - - The size of dimension arrows - - - - - - - - - - - 0 - 0 - - - - The font to use for texts and dimensions - - - - - - - The line style - - + + + + + + The display mode for faces + + + + Flat Lines + + + + + Wireframe + + + + + Shaded + + + + + Points + + + + + + - Solid + Shape color - - + + + + - Dashed + Transparency - - + + + + + + The transparency of faces + + + % + + + 100 + + + + + + + + + + Annotations + + + + + + The type of dimension arrows + + + + Dot + + + + + Circle + + + + + Arrow + + + + + Tick + + + + + Tick-2 + + + + + + - Dotted + Text font - - + + + + - DashDot + Text color - - - - - - - Text size - - - - - - - Unit override - - - - - - - If the unit siffix is shown on dimension texts or not - - - Qt::RightToLeft - - - - - - - - - - The unit to use for dimensions. Leave blank to use current FreeCAD unit - - - - - - - The transparency of faces - - - % - - - 100 - - - - - - - Transparency - - - - - - - Display mode - - - - - - - Text font - - - - - - - Arrow size - - - - - - - The display mode for faces - - + + + + + + + 0 + 0 + + + + The font to use for texts and dimensions + + + + + - Flat Lines + Text size - - + + + + + + The color of texts and dimension texts + + + + + + + The size of texts and dimension texts + + + + + + + + - Wireframe + Arrow style + + + + + + + If the unit siffix is shown on dimension texts or not + + + Qt::RightToLeft - - - Shaded + - - + + + + + + The size of dimension arrows + + + + + + + + - Points + Show unit - - - - - - - Draw style - - - - - - - The color of lines - - - - - - - Arrow style - - - - - - - px - - - - + + + + + + Arrow size + + + + + + + Unit override + + + + + + + The unit to use for dimensions. Leave blank to use current FreeCAD unit + + + + + From 22c555d4608f2adbaa2891a0d98b08adc0a886dc Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 9 Dec 2020 14:45:52 +0100 Subject: [PATCH 5/8] Fix compiler warnings about redefinition of GL_GLEXT_LEGACY --- cMake/FindOpenCasCade.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cMake/FindOpenCasCade.cmake b/cMake/FindOpenCasCade.cmake index 95dadd2935..3a43abcb79 100644 --- a/cMake/FindOpenCasCade.cmake +++ b/cMake/FindOpenCasCade.cmake @@ -37,6 +37,10 @@ else(OCE_FOUND) #look for OpenCASCADE # we first try to find opencascade directly: if(NOT OCCT_CMAKE_FALLBACK) find_package(OpenCASCADE CONFIG QUIET) + get_property(flags DIRECTORY PROPERTY COMPILE_DEFINITIONS) + # OCCT 7.5 adds this define that causes hundreds of compiler warnings with Qt5.x, so remove it again + list(FILTER flags EXCLUDE REGEX [[GL_GLEXT_LEGACY]]) + set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS ${flags}) endif(NOT OCCT_CMAKE_FALLBACK) if(OpenCASCADE_FOUND) set(OCC_FOUND ${OpenCASCADE_FOUND}) From f54c755dc028b92666c3fc94b55c0b884191b08d Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 9 Dec 2020 15:38:06 +0100 Subject: [PATCH 6/8] Main: [skip ci] handle C++ exception in main() function --- src/Main/MainGui.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Main/MainGui.cpp b/src/Main/MainGui.cpp index 1d75c2d167..e0a92e4e68 100644 --- a/src/Main/MainGui.cpp +++ b/src/Main/MainGui.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -309,6 +310,10 @@ int main( int argc, char ** argv ) e.ReportException(); exit(1); } + catch (const std::exception& e) { + Base::Console().Error("Application unexpectedly terminated: %s\n", e.what()); + exit(1); + } catch (...) { Base::Console().Error("Application unexpectedly terminated\n"); exit(1); From 564610211c7aa4a3062f1d9807fc9cd711db6d06 Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 9 Dec 2020 16:22:14 +0100 Subject: [PATCH 7/8] Gui: [skip ci] Fix Qt warning 'Unable to set geometry ...' --- src/Gui/Widgets.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Gui/Widgets.cpp b/src/Gui/Widgets.cpp index 0c5c9f123c..57ccb8c325 100644 --- a/src/Gui/Widgets.cpp +++ b/src/Gui/Widgets.cpp @@ -774,6 +774,7 @@ void ColorButton::onChooseColor() } cd.setCurrentColor(currentColor); + cd.adjustSize(); if (cd.exec() == QDialog::Accepted) { QColor c = cd.selectedColor(); if (c.isValid()) { From c235b9fba9b998a45c33f2d36e4d17e0eac05ba9 Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 9 Dec 2020 16:59:34 +0100 Subject: [PATCH 8/8] PD: [skip ci] fix invalid strings --- src/Mod/PartDesign/WizardShaft/Shaft.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Mod/PartDesign/WizardShaft/Shaft.py b/src/Mod/PartDesign/WizardShaft/Shaft.py index bcae55df69..b8f3a1841e 100644 --- a/src/Mod/PartDesign/WizardShaft/Shaft.py +++ b/src/Mod/PartDesign/WizardShaft/Shaft.py @@ -53,12 +53,12 @@ class Shaft: wstrings = (("", "", "", "", ""), ("Translation [y]", "x", "mm", "w_y", "mm"), ("Translation [z]", "x", "mm", "w_z", "mm")) - sigmaNstrings = (("Normal stress [x]", "x", "mm", "\sigma_x", u"N/mm²"), - ("Shear stress [y]", "x", "mm", "\sigma_y", u"N/mm²"), - ("Shear stress [z]", "x", "mm", "\sigma_z", u"N/mm²")) - sigmaBstrings = (("Torque stress [x]", "x", "mm", "\tau_t", u"N/mm²"), - ("Bending stress [z]", "x", "mm", "\sigma_{b,z}", u"N/mm²"), - ("Bending stress [y]", "x", "mm", "\sigma_{b,y}", u"N/mm²")) + sigmaNstrings = (("Normal stress [x]", "x", "mm", "\\sigma_x", u"N/mm²"), + ("Shear stress [y]", "x", "mm", "\\sigma_y", u"N/mm²"), + ("Shear stress [z]", "x", "mm", "\\sigma_z", u"N/mm²")) + sigmaBstrings = (("Torque stress [x]", "x", "mm", "\\tau_t", u"N/mm²"), + ("Bending stress [z]", "x", "mm", "\\sigma_{b,z}", u"N/mm²"), + ("Bending stress [y]", "x", "mm", "\\sigma_{b,y}", u"N/mm²")) def __init__(self, parent): self.parent = parent