make the quantize dialog persistent so that settings are retained
This commit is contained in:
parent
0cd1db76f0
commit
ee791f251a
|
@ -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*
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user