fix stupid thinko in varispeed limitation for record enable
[ardour.git] / gtk2_ardour / edit_note_dialog.cc
index 0d22e0ae95a9e26368ed9f3a5bb747d3fec8ac7b..2894f95271abeb05d8def7ca10f58c5e4ef4ab62 100644 (file)
@@ -23,6 +23,7 @@
 #include "edit_note_dialog.h"
 #include "canvas-note-event.h"
 #include "midi_region_view.h"
+#include "i18n.h"
 
 using namespace Gtk;
 
@@ -111,8 +112,15 @@ EditNoteDialog::run ()
                return r;
        }
 
-       _region_view->start_diff_command (_("edit note"));
-       
+       /* These calls mean that if a value is entered using the keyboard
+          it will be returned by the get_value_as_int()s below.
+       */
+       _channel.update ();
+       _pitch.update ();
+       _velocity.update ();
+
+       _region_view->start_note_diff_command (_("edit note"));
+
        bool had_change = false;
 
        if (_channel.get_value_as_int() - 1 != _event->note()->channel()) {
@@ -131,7 +139,7 @@ EditNoteDialog::run ()
        }
 
        double const t = _region_view->time_converter().from (_time_clock.current_time ());
-       
+
        if (t != _event->note()->time()) {
                _region_view->change_note_time (_event, t);
                had_change = true;
@@ -150,7 +158,7 @@ EditNoteDialog::run ()
 
        _region_view->apply_diff ();
 
-       _event->set_selected (_event->selected()); // change color 
-       
+       _event->set_selected (_event->selected()); // change color
+
        return r;
 }