Merge remote-tracking branch 'remotes/origin/lm_220_alpha1_hotfix'
This commit is contained in:
commit
305ccfd907
3 changed files with 9 additions and 5 deletions
|
@ -443,13 +443,13 @@ int copy_file(const std::string &from, const std::string &to, const bool with_ch
|
||||||
{
|
{
|
||||||
std::string to_temp = to + ".tmp";
|
std::string to_temp = to + ".tmp";
|
||||||
int ret_val = copy_file_inner(from,to_temp);
|
int ret_val = copy_file_inner(from,to_temp);
|
||||||
if(ret_val == 0 && with_check)
|
if(ret_val == 0)
|
||||||
{
|
{
|
||||||
ret_val = check_copy(from, to_temp);
|
if (with_check)
|
||||||
if (ret_val == 0)
|
ret_val = check_copy(from, to_temp);
|
||||||
{
|
|
||||||
|
if (ret_val == 0)
|
||||||
rename_file(to_temp, to);
|
rename_file(to_temp, to);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return ret_val;
|
return ret_val;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include <wx/numformatter.h>
|
#include <wx/numformatter.h>
|
||||||
#include <wx/colordlg.h>
|
#include <wx/colordlg.h>
|
||||||
|
|
||||||
|
#include <boost/filesystem.hpp>
|
||||||
#include <boost/algorithm/string/replace.hpp>
|
#include <boost/algorithm/string/replace.hpp>
|
||||||
#include <boost/nowide/cstdio.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()) {
|
if (Slic3r::GUI::wxGetApp().dark_mode()) {
|
||||||
bmp_name = folder + bmp_name_in;
|
bmp_name = folder + bmp_name_in;
|
||||||
boost::replace_last(bmp_name, ".png", "");
|
boost::replace_last(bmp_name, ".png", "");
|
||||||
|
if (! boost::filesystem::exists(Slic3r::var(bmp_name + ".svg")))
|
||||||
|
bmp_name.clear();
|
||||||
}
|
}
|
||||||
if (bmp_name.empty()) {
|
if (bmp_name.empty()) {
|
||||||
bmp_name = bmp_name_in;
|
bmp_name = bmp_name_in;
|
||||||
|
|
Loading…
Add table
Reference in a new issue