From 26c2b16f6169887e277834b11fc5c6f8f5c8845a Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Fri, 28 Jun 2019 15:24:28 +0200 Subject: [PATCH 1/2] Build: Remove SLIC3R_SYNTAXONLY --- CMakeLists.txt | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ba291e450..cbb0e2ec4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,6 @@ option(SLIC3R_MSVC_COMPILE_PARALLEL "Compile on Visual Studio in parallel" 1) option(SLIC3R_MSVC_PDB "Generate PDB files on MSVC in Release mode" 1) option(SLIC3R_PERL_XS "Compile XS Perl module and enable Perl unit and integration tests" 0) option(SLIC3R_ASAN "Enable ASan on Clang and GCC" 0) -option(SLIC3R_SYNTAXONLY "Only perform source code correctness checking, no binary output (UNIX only)" 0) set(SLIC3R_GTK "2" CACHE STRING "GTK version to use with wxWidgets on Linux") @@ -147,19 +146,6 @@ endif() if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUXX) # Adding -fext-numeric-literals to enable GCC extensions on definitions of quad float literals, which are required by Boost. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fext-numeric-literals" ) - - if (SLIC3R_SYNTAXONLY) - set(CMAKE_CXX_ARCHIVE_CREATE "true") - set(CMAKE_C_ARCHIVE_CREATE "true") - set(CMAKE_CXX_ARCHIVE_APPEND "true") - set(CMAKE_C_ARCHIVE_APPEND "true") - set(CMAKE_RANLIB "true") - set(CMAKE_C_LINK_EXECUTABLE "true") - set(CMAKE_CXX_LINK_EXECUTABLE "true") - - set(CMAKE_C_COMPILE_OBJECT " -fsyntax-only -c && touch ") - set(CMAKE_CXX_COMPILE_OBJECT " -fsyntax-only -c && touch ") - endif () endif() if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") From ba21d606af88b470de11652cdba5e29059f48e66 Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Fri, 26 Jul 2019 13:52:51 +0200 Subject: [PATCH 2/2] Fix a ternary op type error in Tab Fix #2668 Fix #2676 --- src/slic3r/GUI/Tab.cpp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 3d934770f..31a2ce614 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -914,14 +914,20 @@ void Tab::update_preset_description_line() { const Preset* parent = m_presets->get_selected_preset_parent(); const Preset& preset = m_presets->get_edited_preset(); - - wxString description_line = preset.is_default ? - _(L("It's a default preset.")) : preset.is_system ? - _(L("It's a system preset.")) : - wxString::Format(_(L("Current preset is inherited from %s")), (parent == nullptr ? - _(L("default preset"))+"." : - ":\n\t" + parent->name)); - + + wxString description_line; + + if (preset.is_default) { + description_line = _(L("This is a default preset.")); + } else if (preset.is_system) { + description_line = _(L("This is a system preset.")); + } else if (parent == nullptr) { + description_line = _(L("Current preset is inherited from the default preset.")); + } else { + description_line = wxString::Format( + _(L("Current preset is inherited from:\n\t%s")), GUI::from_u8(parent->name)); + } + if (preset.is_default || preset.is_system) description_line += "\n\t" + _(L("It can't be deleted or modified.")) + "\n\t" + _(L("Any modifications should be saved as a new preset inherited from this one.")) +