Merge remote-tracking branch 'remotes/origin/lm_220_alpha1_hotfix'

This commit is contained in:
bubnikv 2019-12-21 17:48:35 +01:00
commit 305ccfd907
3 changed files with 9 additions and 5 deletions

View file

@ -443,14 +443,14 @@ int copy_file(const std::string &from, const std::string &to, const bool with_ch
{
std::string to_temp = to + ".tmp";
int ret_val = copy_file_inner(from,to_temp);
if(ret_val == 0 && with_check)
if(ret_val == 0)
{
if (with_check)
ret_val = check_copy(from, to_temp);
if (ret_val == 0)
{
rename_file(to_temp, to);
}
}
return ret_val;
}

View file

@ -3,6 +3,7 @@
#include <vector>
#include <string>
#include <functional>
namespace Slic3r {
namespace GUI {

View file

@ -13,6 +13,7 @@
#include <wx/numformatter.h>
#include <wx/colordlg.h>
#include <boost/filesystem.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <boost/nowide/cstdio.hpp>
@ -437,6 +438,8 @@ static std::string icon_name_respected_to_mode(const std::string& bmp_name_in)
if (Slic3r::GUI::wxGetApp().dark_mode()) {
bmp_name = folder + bmp_name_in;
boost::replace_last(bmp_name, ".png", "");
if (! boost::filesystem::exists(Slic3r::var(bmp_name + ".svg")))
bmp_name.clear();
}
if (bmp_name.empty()) {
bmp_name = bmp_name_in;