mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-09 21:49:09 +08:00
Removed error dialog when texture file does not exist
This commit is contained in:
parent
f8bbfad152
commit
b386f52acc
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
#include <wx/image.h>
|
#include <wx/image.h>
|
||||||
|
|
||||||
|
#include <boost/filesystem.hpp>
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
@ -27,6 +29,9 @@ bool GLTexture::load_from_file(const std::string& filename, bool generate_mipmap
|
|||||||
{
|
{
|
||||||
reset();
|
reset();
|
||||||
|
|
||||||
|
if (!boost::filesystem::exists(filename))
|
||||||
|
return false;
|
||||||
|
|
||||||
// Load a PNG with an alpha channel.
|
// Load a PNG with an alpha channel.
|
||||||
wxImage image;
|
wxImage image;
|
||||||
if (!image.LoadFile(filename, wxBITMAP_TYPE_PNG))
|
if (!image.LoadFile(filename, wxBITMAP_TYPE_PNG))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user