X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fedit_note_dialog.cc;h=2894f95271abeb05d8def7ca10f58c5e4ef4ab62;hb=11d041f6c021b70dd245fd41e9f167cb0f36c96e;hp=0d22e0ae95a9e26368ed9f3a5bb747d3fec8ac7b;hpb=8b68ed57ec5c075261639435be3290c3ba8177eb;p=ardour.git diff --git a/gtk2_ardour/edit_note_dialog.cc b/gtk2_ardour/edit_note_dialog.cc index 0d22e0ae95..2894f95271 100644 --- a/gtk2_ardour/edit_note_dialog.cc +++ b/gtk2_ardour/edit_note_dialog.cc @@ -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; }