allow to undo removing last widget
authorgc <gc>
Sat, 16 Apr 2005 22:12:01 +0000 (22:12 +0000)
committergc <gc>
Sat, 16 Apr 2005 22:12:01 +0000 (22:12 +0000)
lib/booh/GtkAutoTable.rb

index eee9aa1c2cbcaa214823a41bf8db8c0178a817c4..149a9d0cef219f17686420840a89075c77744e1b 100644 (file)
@@ -280,7 +280,7 @@ class Gtk::AutoTable < Gtk::VBox
         if unallocated = @children.find { |e| !e[:allocation] }
             #- waiting for allocations. replace last displayed widget with first unallocated.
             last_container = @containers[-1]
-            put(unallocated, last_container[:x], last_container[:y])
+            put(unallocated, last_container ? last_container[:x] : 0, last_container ? last_container[:y]: 0)
 
         else
             if @children.size == 0