summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/tree.c3
-rw-r--r--image/mng.c7
-rw-r--r--image/mng.h1
3 files changed, 8 insertions, 3 deletions
diff --git a/desktop/tree.c b/desktop/tree.c
index ee139e96b..5a843ed08 100644
--- a/desktop/tree.c
+++ b/desktop/tree.c
@@ -870,6 +870,9 @@ void tree_delete_node(struct tree *tree, struct node *node, bool siblings) {
assert(node);
while (node) {
+ if (tree->temp_selection == node)
+ tree->temp_selection = NULL;
+
next = node->next;
if (node->child)
tree_delete_node(tree, node->child, true);
diff --git a/image/mng.c b/image/mng.c
index a223c7fff..a82017b1d 100644
--- a/image/mng.c
+++ b/image/mng.c
@@ -263,9 +263,7 @@ bool nsmng_convert(struct content *c, int width, int height) {
/* Optimise the plotting of JNG/PNGs
*/
- if ((c->type == CONTENT_PNG) || (c->type == CONTENT_JNG)) {
- bitmap_set_opaque(c->bitmap, bitmap_test_opaque(c->bitmap));
- }
+ c->data.mng.opaque_test_pending = (c->type == CONTENT_PNG) || (c->type == CONTENT_JNG);
return true;
}
@@ -382,6 +380,9 @@ bool nsmng_redraw(struct content *c, int x, int y,
float scale, unsigned long background_colour)
{
bool ret;
+
+ if ((c->bitmap) && (c->data.mng.opaque_test_pending))
+ bitmap_set_opaque(c->bitmap, bitmap_test_opaque(c->bitmap));
ret = plot.bitmap(x, y, width, height,
c->bitmap, background_colour);
diff --git a/image/mng.h b/image/mng.h
index 6a67b840e..d0f2fcb75 100644
--- a/image/mng.h
+++ b/image/mng.h
@@ -17,6 +17,7 @@
struct content;
struct content_mng_data {
+ bool opaque_test_pending;
bool read_start;
bool read_resume;
int read_size;