From 3658f96b162bca4d100fac0533d42456364dc94d Mon Sep 17 00:00:00 2001 From: bubnikv Date: Fri, 21 Sep 2018 15:42:31 +0200 Subject: [PATCH] Fixed compilation on Linux / OSX. --- src/slic3r/GUI/MainFrame.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index ba80aca71..abad30424 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include "Tab.hpp" #include "PresetBundle.hpp" @@ -647,7 +648,9 @@ void MainFrame::export_config() !m_last_config.IsEmpty() ? get_dir_name(m_last_config) : wxGetApp().app_config->get_last_dir(), !m_last_config.IsEmpty() ? get_base_name(m_last_config) : "config.ini", FILE_WILDCARDS.at("ini"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT); - wxString file = dlg->ShowModal() == wxID_OK ? dlg->GetPath() : wxEmptyString; + wxString file; + if (dlg->ShowModal() == wxID_OK) + file = dlg->GetPath(); dlg->Destroy(); if (!file.IsEmpty()) { wxGetApp().app_config->update_config_dir(get_dir_name(file)); @@ -697,7 +700,9 @@ void MainFrame::export_configbundle() !m_last_config.IsEmpty() ? get_dir_name(m_last_config) : wxGetApp().app_config->get_last_dir(), "Slic3r_config_bundle.ini", FILE_WILDCARDS.at("ini"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT); - wxString file = dlg->ShowModal() == wxID_OK ? dlg->GetPath() : wxEmptyString; + wxString file; + if (dlg->ShowModal() == wxID_OK) + file = dlg->GetPath(); dlg->Destroy(); if (!file.IsEmpty()) { // Export the config bundle.