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
*/
+#include <gtkmm/stock.h>
#include "gtkmm2ext/utils.h"
#include "quantize_dialog.h"
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()