[dia] Bug 662478 - Layers/Add Layer... does not [visibly] add layer



commit 9bac8677a66b76a510b7301bb154028a6d340dd2
Author: Hans Breuer <hans breuer org>
Date:   Fri Sep 13 21:33:59 2013 +0200

    Bug 662478 - Layers/Add Layer... does not [visibly] add layer
    
    Instead of some signal connecting this is done the old way:
    just more calls to the update function

 app/layer_dialog.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/app/layer_dialog.c b/app/layer_dialog.c
index 94417a1..4978c7b 100644
--- a/app/layer_dialog.c
+++ b/app/layer_dialog.c
@@ -1127,7 +1127,12 @@ edit_layer_add_ok_callback (GtkWidget *w, gpointer client_data)
   
   undo_layer(dia, layer, TYPE_ADD_LAYER, pos);
   undo_set_transactionpoint(dia->undo);
-    
+
+  /* ugly way of updating the layer widget */
+  if (layer_dialog && layer_dialog->diagram == dia) {
+    layer_dialog_set_diagram(dia);
+  }
+
   gtk_widget_destroy (dialog->dialog);
   g_free (dialog);
 }
@@ -1146,6 +1151,12 @@ edit_layer_rename_ok_callback (GtkWidget *w, gpointer client_data)
   diagram_flush(dia);
   /* FIXME: undo handling */
 
+  /* ugly way of updating the layer widget */
+  if (layer_dialog && layer_dialog->diagram == dia) {
+    layer_dialog_set_diagram(dia);
+  }
+
+
   gtk_widget_destroy (dialog->dialog);
   g_free (dialog);
 }


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