Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/xs
diff options
context:
space:
mode:
authorEnrico Turri <enricoturri@seznam.cz>2018-06-21 10:54:43 +0300
committerEnrico Turri <enricoturri@seznam.cz>2018-06-21 10:54:43 +0300
commitb386f52accc85907c9c69a35e7948382f674333c (patch)
treed736ecfa92e2087d3b2ae58c3dfde70e152fc793 /xs
parentf8bbfad1523e2630a7f34de969c02f45c0bd5e06 (diff)
Removed error dialog when texture file does not exist
Diffstat (limited to 'xs')
-rw-r--r--xs/src/slic3r/GUI/GLTexture.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/xs/src/slic3r/GUI/GLTexture.cpp b/xs/src/slic3r/GUI/GLTexture.cpp
index 593362e54..924920bd8 100644
--- a/xs/src/slic3r/GUI/GLTexture.cpp
+++ b/xs/src/slic3r/GUI/GLTexture.cpp
@@ -4,6 +4,8 @@
#include <wx/image.h>
+#include <boost/filesystem.hpp>
+
#include <vector>
#include <algorithm>
@@ -27,6 +29,9 @@ bool GLTexture::load_from_file(const std::string& filename, bool generate_mipmap
{
reset();
+ if (!boost::filesystem::exists(filename))
+ return false;
+
// Load a PNG with an alpha channel.
wxImage image;
if (!image.LoadFile(filename, wxBITMAP_TYPE_PNG))