Merge branch 'vk-bugfixes':

- Fix a ternary op type error in Tab
- Build: Remove SLIC3R_SYNTAXONLY
This commit is contained in:
Vojtech Kral 2019-07-26 14:28:01 +02:00
commit dda7b3fc52
2 changed files with 14 additions and 22 deletions

View File

@ -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 "<CMAKE_C_COMPILER> -fsyntax-only <DEFINES> <INCLUDES> <FLAGS> -c <SOURCE> && touch <OBJECT>")
set(CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> -fsyntax-only <DEFINES> <INCLUDES> <FLAGS> -c <SOURCE> && touch <OBJECT>")
endif ()
endif()
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")

View File

@ -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.")) +