[gthumb] template editor: preview label: do not change height if empty



commit 5920da547fd163b9d0a79ee34476c4eab35ad7bc
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Wed Jun 2 12:49:36 2021 +0200

    template editor: preview label: do not change height if empty

 gthumb/gth-template-editor-dialog.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gthumb/gth-template-editor-dialog.c b/gthumb/gth-template-editor-dialog.c
index c17cae2c..f52e395e 100644
--- a/gthumb/gth-template-editor-dialog.c
+++ b/gthumb/gth-template-editor-dialog.c
@@ -236,6 +236,10 @@ _gth_template_editor_update_preview (GthTemplateEditorDialog *self)
        else
                preview = _get_preview_from_template (self, template, TRUE);
 
+       if (_g_str_empty (preview)) {
+               g_free (preview);
+               preview = g_strdup (" ");
+       }
        gtk_label_set_markup (GTK_LABEL (self->priv->preview), preview);
 
        g_free (preview);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]