Merge branch 'm-bugfix' into dev
This commit is contained in:
commit
fb4c5e1ce2
@ -120,6 +120,10 @@ void RTImage::changeImage (const Glib::ustring& imageName)
|
|||||||
{
|
{
|
||||||
clear ();
|
clear ();
|
||||||
|
|
||||||
|
if (imageName.empty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (pixbuf) {
|
if (pixbuf) {
|
||||||
auto iterator = pixbufCache.find (imageName);
|
auto iterator = pixbufCache.find (imageName);
|
||||||
assert(iterator != pixbufCache.end ());
|
assert(iterator != pixbufCache.end ());
|
||||||
@ -169,6 +173,17 @@ void RTImage::init()
|
|||||||
scaleBack = RTScalable::getScale();
|
scaleBack = RTScalable::getScale();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RTImage::cleanup()
|
||||||
|
{
|
||||||
|
for (auto& entry : pixbufCache) {
|
||||||
|
entry.second.reset();
|
||||||
|
}
|
||||||
|
for (auto& entry : surfaceCache) {
|
||||||
|
entry.second.clear();
|
||||||
|
}
|
||||||
|
RTScalable::cleanup();
|
||||||
|
}
|
||||||
|
|
||||||
void RTImage::updateImages()
|
void RTImage::updateImages()
|
||||||
{
|
{
|
||||||
for (auto& entry : pixbufCache) {
|
for (auto& entry : pixbufCache) {
|
||||||
|
@ -52,6 +52,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
static void init();
|
static void init();
|
||||||
|
static void cleanup();
|
||||||
static void updateImages ();
|
static void updateImages ();
|
||||||
static void setDPInScale (const double newDPI, const int newScale);
|
static void setDPInScale (const double newDPI, const int newScale);
|
||||||
static void setScale (const int newScale);
|
static void setScale (const int newScale);
|
||||||
|
@ -463,7 +463,7 @@ RTWindow::~RTWindow()
|
|||||||
delete fpanel;
|
delete fpanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
RTScalable::cleanup();
|
RTImage::cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RTWindow::on_realize ()
|
void RTWindow::on_realize ()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user