mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 02:07:54 -06:00
Removed error dialog when texture file does not exist
This commit is contained in:
parent
f8bbfad152
commit
b386f52acc
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue