mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-18 04:36:30 +01:00
make the quantize dialog persistent so that settings are retained
This commit is contained in:
parent
0cd1db76f0
commit
ee791f251a
3 changed files with 19 additions and 7 deletions
|
|
@ -115,6 +115,7 @@
|
||||||
#include "note_base.h"
|
#include "note_base.h"
|
||||||
#include "playlist_selector.h"
|
#include "playlist_selector.h"
|
||||||
#include "public_editor.h"
|
#include "public_editor.h"
|
||||||
|
#include "quantize_dialog.h"
|
||||||
#include "region_layering_order_editor.h"
|
#include "region_layering_order_editor.h"
|
||||||
#include "rgb_macros.h"
|
#include "rgb_macros.h"
|
||||||
#include "rhythm_ferret.h"
|
#include "rhythm_ferret.h"
|
||||||
|
|
@ -300,6 +301,7 @@ Editor::Editor ()
|
||||||
, _following_mixer_selection (false)
|
, _following_mixer_selection (false)
|
||||||
, _control_point_toggled_on_press (false)
|
, _control_point_toggled_on_press (false)
|
||||||
, _stepping_axis_view (0)
|
, _stepping_axis_view (0)
|
||||||
|
, quantize_dialog (0)
|
||||||
{
|
{
|
||||||
constructed = false;
|
constructed = false;
|
||||||
|
|
||||||
|
|
@ -809,6 +811,7 @@ Editor::~Editor()
|
||||||
delete _track_canvas_viewport;
|
delete _track_canvas_viewport;
|
||||||
delete _drags;
|
delete _drags;
|
||||||
delete nudge_clock;
|
delete nudge_clock;
|
||||||
|
delete quantize_dialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
XMLNode*
|
XMLNode*
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,7 @@ class NoteBase;
|
||||||
class PlaylistSelector;
|
class PlaylistSelector;
|
||||||
class PluginSelector;
|
class PluginSelector;
|
||||||
class ProgressReporter;
|
class ProgressReporter;
|
||||||
|
class QuantizeDialog;
|
||||||
class RhythmFerret;
|
class RhythmFerret;
|
||||||
class RulerDialog;
|
class RulerDialog;
|
||||||
class Selection;
|
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 update_bring_in_message (Gtk::Label* label, uint32_t n, uint32_t total, std::string name);
|
||||||
void bring_all_sources_into_session ();
|
void bring_all_sources_into_session ();
|
||||||
|
|
||||||
|
QuantizeDialog* quantize_dialog;
|
||||||
|
|
||||||
friend class Drag;
|
friend class Drag;
|
||||||
friend class RegionDrag;
|
friend class RegionDrag;
|
||||||
friend class RegionMoveDrag;
|
friend class RegionMoveDrag;
|
||||||
|
|
|
||||||
|
|
@ -5182,16 +5182,22 @@ Editor::quantize_regions (const RegionSelection& rs)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QuantizeDialog* qd = new QuantizeDialog (*this);
|
if (!quantize_dialog) {
|
||||||
|
quantize_dialog = new QuantizeDialog (*this);
|
||||||
|
}
|
||||||
|
|
||||||
qd->present ();
|
quantize_dialog->present ();
|
||||||
const int r = qd->run ();
|
const int r = quantize_dialog->run ();
|
||||||
qd->hide ();
|
quantize_dialog->hide ();
|
||||||
|
|
||||||
if (r == Gtk::RESPONSE_OK) {
|
if (r == Gtk::RESPONSE_OK) {
|
||||||
Quantize quant (qd->snap_start(), qd->snap_end(),
|
Quantize quant (quantize_dialog->snap_start(),
|
||||||
qd->start_grid_size(), qd->end_grid_size(),
|
quantize_dialog->snap_end(),
|
||||||
qd->strength(), qd->swing(), qd->threshold());
|
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);
|
apply_midi_note_edit_op (quant, rs);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue