From e0e75f4a0e9a3942edd5f635ba309adb2f8208ef Mon Sep 17 00:00:00 2001 From: Slic3rPE Date: Wed, 26 Aug 2020 15:50:05 +0200 Subject: [PATCH 1/2] Starting a new Slicer instance from the menu - fix of Windows build --- src/slic3r/GUI/MainFrame.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 122d9c610..8f2aeef8a 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -13,7 +13,6 @@ #include #include -#include #include "libslic3r/Print.hpp" #include "libslic3r/Polygon.hpp" @@ -41,6 +40,12 @@ #include #endif // _WIN32 +// For starting another PrusaSlicer instance on OSX. +// Fails to compile on Windows on the build server. +#ifdef __APPLE__ + #include +#endif + namespace Slic3r { namespace GUI { From 41f474a884bdad01b973cd6bb734cea3a31384fc Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 26 Aug 2020 21:51:50 +0200 Subject: [PATCH 2/2] Fixed performance issues when adding / removing Presets into PresetCollection. This improves application startup time by 25-33%. --- src/libslic3r/PrintConfig.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index c4566c983..b133a2e4e 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -239,9 +239,13 @@ class DynamicPrintConfig : public DynamicConfig public: DynamicPrintConfig() {} DynamicPrintConfig(const DynamicPrintConfig &rhs) : DynamicConfig(rhs) {} + DynamicPrintConfig(DynamicPrintConfig &&rhs) noexcept : DynamicConfig(std::move(rhs)) {} explicit DynamicPrintConfig(const StaticPrintConfig &rhs); explicit DynamicPrintConfig(const ConfigBase &rhs) : DynamicConfig(rhs) {} + DynamicPrintConfig& operator=(const DynamicPrintConfig &rhs) { DynamicConfig::operator=(rhs); return *this; } + DynamicPrintConfig& operator=(DynamicPrintConfig &&rhs) noexcept { DynamicConfig::operator=(std::move(rhs)); return *this; } + static DynamicPrintConfig full_print_config(); static DynamicPrintConfig* new_from_defaults_keys(const std::vector &keys);