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

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/xs/src
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2017-11-30 22:25:59 +0300
committerbubnikv <bubnikv@gmail.com>2017-11-30 22:25:59 +0300
commit354408c7e62f022d86a87fbc13301d4f6d488298 (patch)
treed283a0e0c76d898011c430f8b45be85a528998f9 /xs/src
parenta0268a190651615ff85229e2e6115702921666ba (diff)
Load the wxWidgets PNG handler only once.
Diffstat (limited to 'xs/src')
-rw-r--r--xs/src/slic3r/GUI/PresetBundle.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/xs/src/slic3r/GUI/PresetBundle.cpp b/xs/src/slic3r/GUI/PresetBundle.cpp
index b216cf70a..143e34e7f 100644
--- a/xs/src/slic3r/GUI/PresetBundle.cpp
+++ b/xs/src/slic3r/GUI/PresetBundle.cpp
@@ -34,7 +34,8 @@ PresetBundle::PresetBundle() :
m_bitmapCompatible(new wxBitmap),
m_bitmapIncompatible(new wxBitmap)
{
- ::wxInitAllImageHandlers();
+ if (wxImage::FindHandler(wxBITMAP_TYPE_PNG) == nullptr)
+ wxImage::AddHandler(new wxPNGHandler);
// Create the ID config keys, as they are not part of the Static print config classes.
this->prints.preset(0).config.opt_string("print_settings_id", true);