don't shadow a closure making shift-arrows abort after a dnd (pixel bug)
authorgc <gc>
Wed, 10 Aug 2005 19:57:06 +0000 (19:57 +0000)
committergc <gc>
Wed, 10 Aug 2005 19:57:06 +0000 (19:57 +0000)
bin/booh

index 6a8dd2ad6c67d8b73909b405296e990a7b431d16..da9101df30619e29e1a1b0a71b82561504edccde 100755 (executable)
--- a/bin/booh
+++ b/bin/booh
@@ -1124,7 +1124,7 @@ def add_thumbnail(autotable, filename, type, thumbnail_img, caption)
         if !done
             ctxt.targets.each { |target|
                 if target.name == 'reorder-elements'
-                    move = Proc.new { |from,to|
+                    move_dnd = Proc.new { |from,to|
                         if from != to
                             $modified = true
                             autotable.move(from, to)
@@ -1144,15 +1144,15 @@ def add_thumbnail(autotable, filename, type, thumbnail_img, caption)
                         end
                     }
                     if $multiple_dnd.size == 0
-                        move.call(selection_data.data.to_i,
-                                  autotable.get_current_number(vbox))
+                        move_dnd.call(selection_data.data.to_i,
+                                      autotable.get_current_number(vbox))
                     else
                         UndoHandler.begin_batch
                         $multiple_dnd.sort { |a,b| autotable.get_current_number($name2widgets[a][:vbox]) <=> autotable.get_current_number($name2widgets[b][:vbox]) }.
                                       each { |path|
                             #- need to update current position between each call
-                            move.call(autotable.get_current_number($name2widgets[path][:vbox]),
-                                      autotable.get_current_number(vbox))
+                            move_dnd.call(autotable.get_current_number($name2widgets[path][:vbox]),
+                                          autotable.get_current_number(vbox))
                         }
                         UndoHandler.end_batch
                     end