diff options
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 14 | ||||
-rw-r--r-- | gtk2_ardour/quantize_dialog.cc | 4 |
2 files changed, 12 insertions, 6 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index a128ed6cf2..9de3d0138f 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -4848,15 +4848,17 @@ Editor::quantize_region () QuantizeDialog* qd = new QuantizeDialog (*this); qd->present (); - qd->run (); + const int r = qd->run (); qd->hide (); - Quantize quant (*session, Plain, - qd->snap_start(), qd->snap_end(), - qd->start_grid_size(), qd->end_grid_size(), - qd->strength(), qd->swing(), qd->threshold()); + if (r == Gtk::RESPONSE_OK) { + Quantize quant (*session, Plain, + qd->snap_start(), qd->snap_end(), + qd->start_grid_size(), qd->end_grid_size(), + qd->strength(), qd->swing(), qd->threshold()); - apply_midi_note_edit_op (quant); + apply_midi_note_edit_op (quant); + } } void diff --git a/gtk2_ardour/quantize_dialog.cc b/gtk2_ardour/quantize_dialog.cc index 5ed867c4c3..f8a6d3a516 100644 --- a/gtk2_ardour/quantize_dialog.cc +++ b/gtk2_ardour/quantize_dialog.cc @@ -17,6 +17,7 @@ */ +#include <gtkmm/stock.h> #include "gtkmm2ext/utils.h" #include "quantize_dialog.h" @@ -147,6 +148,9 @@ QuantizeDialog::QuantizeDialog (PublicEditor& e) snap_start_button.set_active (true); snap_end_button.set_active (false); + + add_button (Stock::CANCEL, RESPONSE_CANCEL); + add_button (Stock::OK, RESPONSE_OK); } QuantizeDialog::~QuantizeDialog() |