diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-06-26 12:34:55 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-06-26 12:47:11 -0400 |
commit | ee791f251aa25a441d3c78d1b8c09b3c8f7c44cf (patch) | |
tree | 44e182fe4c330348a2f82832844a7ca725db7eb8 | |
parent | 0cd1db76f04cf2d15bd257763a92ecd92fa534ce (diff) |
make the quantize dialog persistent so that settings are retained
-rw-r--r-- | gtk2_ardour/editor.cc | 3 | ||||
-rw-r--r-- | gtk2_ardour/editor.h | 3 | ||||
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 20 |
3 files changed, 19 insertions, 7 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 534dd26ddb..ea4da49325 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -115,6 +115,7 @@ #include "note_base.h" #include "playlist_selector.h" #include "public_editor.h" +#include "quantize_dialog.h" #include "region_layering_order_editor.h" #include "rgb_macros.h" #include "rhythm_ferret.h" @@ -300,6 +301,7 @@ Editor::Editor () , _following_mixer_selection (false) , _control_point_toggled_on_press (false) , _stepping_axis_view (0) + , quantize_dialog (0) { constructed = false; @@ -809,6 +811,7 @@ Editor::~Editor() delete _track_canvas_viewport; delete _drags; delete nudge_clock; + delete quantize_dialog; } XMLNode* diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index d5645a1e82..ac25455c04 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -119,6 +119,7 @@ class NoteBase; class PlaylistSelector; class PluginSelector; class ProgressReporter; +class QuantizeDialog; class RhythmFerret; class RulerDialog; class Selection; @@ -2237,6 +2238,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void update_bring_in_message (Gtk::Label* label, uint32_t n, uint32_t total, std::string name); void bring_all_sources_into_session (); + QuantizeDialog* quantize_dialog; + friend class Drag; friend class RegionDrag; friend class RegionMoveDrag; diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 2413126e3a..ccb9fe55be 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -5182,16 +5182,22 @@ Editor::quantize_regions (const RegionSelection& rs) return; } - QuantizeDialog* qd = new QuantizeDialog (*this); + if (!quantize_dialog) { + quantize_dialog = new QuantizeDialog (*this); + } - qd->present (); - const int r = qd->run (); - qd->hide (); + quantize_dialog->present (); + const int r = quantize_dialog->run (); + quantize_dialog->hide (); if (r == Gtk::RESPONSE_OK) { - Quantize quant (qd->snap_start(), qd->snap_end(), - qd->start_grid_size(), qd->end_grid_size(), - qd->strength(), qd->swing(), qd->threshold()); + Quantize quant (quantize_dialog->snap_start(), + quantize_dialog->snap_end(), + quantize_dialog->start_grid_size(), + quantize_dialog->end_grid_size(), + quantize_dialog->strength(), + quantize_dialog->swing(), + quantize_dialog->threshold()); apply_midi_note_edit_op (quant, rs); } |