X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=inline;f=gtk2_ardour%2Fedit_note_dialog.cc;h=0568468d6338513a657040276db17c4eb5da2596;hb=ad9cebe2474354b9e11ea3a9e3521f1aa98c561a;hp=2782122dbf0693f89c36ed296586280b1ffb05fb;hpb=9a8ee11f6532c73320f76b10aabec68081c9ebf4;p=ardour.git diff --git a/gtk2_ardour/edit_note_dialog.cc b/gtk2_ardour/edit_note_dialog.cc index 2782122dbf..0568468d63 100644 --- a/gtk2_ardour/edit_note_dialog.cc +++ b/gtk2_ardour/edit_note_dialog.cc @@ -116,8 +116,8 @@ EditNoteDialog::EditNoteDialog (MidiRegionView* rv, set n) int test_channel = (*_events.begin())->note()->channel (); int test_pitch = (*_events.begin())->note()->note (); int test_velocity = (*_events.begin())->note()->velocity (); - double test_time = (*_events.begin())->note()->time (); - double test_length = (*_events.begin())->note()->length (); + Evoral::Beats test_time = (*_events.begin())->note()->time (); + Evoral::Beats test_length = (*_events.begin())->note()->length (); for (set::iterator i = _events.begin(); i != _events.end(); ++i) { if ((*i)->note()->channel() != test_channel) { @@ -146,16 +146,13 @@ EditNoteDialog::EditNoteDialog (MidiRegionView* rv, set n) add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); add_button (Gtk::Stock::APPLY, Gtk::RESPONSE_ACCEPT); set_default_response (Gtk::RESPONSE_ACCEPT); - - show_all (); } -int -EditNoteDialog::run () +void +EditNoteDialog::done (int r) { - int const r = Dialog::run (); if (r != RESPONSE_ACCEPT) { - return r; + return; } /* These calls mean that if a value is entered using the keyboard @@ -196,7 +193,7 @@ EditNoteDialog::run () } } - double const t = _region_view->source_relative_time_converter().from (_time_clock.current_time ()); + Evoral::Beats const t = _region_view->source_relative_time_converter().from (_time_clock.current_time ()); if (!_time_all.get_sensitive() || _time_all.get_active ()) { for (set::iterator i = _events.begin(); i != _events.end(); ++i) { @@ -207,7 +204,7 @@ EditNoteDialog::run () } } - double const d = _region_view->region_relative_time_converter().from (_length_clock.current_duration ()); + Evoral::Beats const d = _region_view->region_relative_time_converter().from (_length_clock.current_duration ()); if (!_length_all.get_sensitive() || _length_all.get_active ()) { for (set::iterator i = _events.begin(); i != _events.end(); ++i) { @@ -227,6 +224,4 @@ EditNoteDialog::run () for (set::iterator i = _events.begin(); i != _events.end(); ++i) { (*i)->set_selected ((*i)->selected()); // change color } - - return r; }