mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
Clean up Session's _current_trans when aborting a drag.
This commit is contained in:
parent
f9b2587458
commit
ff13ac8b4f
6 changed files with 24 additions and 0 deletions
|
|
@ -3428,6 +3428,15 @@ Editor::begin_reversible_command (GQuark q)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Editor::abort_reversible_command ()
|
||||||
|
{
|
||||||
|
if (_session) {
|
||||||
|
before.clear();
|
||||||
|
_session->abort_reversible_command ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::commit_reversible_command ()
|
Editor::commit_reversible_command ()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -452,6 +452,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
void redo_selection_op ();
|
void redo_selection_op ();
|
||||||
void begin_reversible_command (std::string cmd_name);
|
void begin_reversible_command (std::string cmd_name);
|
||||||
void begin_reversible_command (GQuark);
|
void begin_reversible_command (GQuark);
|
||||||
|
void abort_reversible_command ();
|
||||||
void commit_reversible_command ();
|
void commit_reversible_command ();
|
||||||
|
|
||||||
DragManager* drags () const {
|
DragManager* drags () const {
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,7 @@ DragManager::abort ()
|
||||||
}
|
}
|
||||||
|
|
||||||
_drags.clear ();
|
_drags.clear ();
|
||||||
|
_editor->abort_reversible_command();
|
||||||
|
|
||||||
_ending = false;
|
_ending = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -396,6 +396,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible, publi
|
||||||
virtual void commit_reversible_selection_op () = 0;
|
virtual void commit_reversible_selection_op () = 0;
|
||||||
virtual void begin_reversible_command (std::string cmd_name) = 0;
|
virtual void begin_reversible_command (std::string cmd_name) = 0;
|
||||||
virtual void begin_reversible_command (GQuark) = 0;
|
virtual void begin_reversible_command (GQuark) = 0;
|
||||||
|
virtual void abort_reversible_command () = 0;
|
||||||
virtual void commit_reversible_command () = 0;
|
virtual void commit_reversible_command () = 0;
|
||||||
|
|
||||||
virtual MouseCursors const * cursors () const = 0;
|
virtual MouseCursors const * cursors () const = 0;
|
||||||
|
|
|
||||||
|
|
@ -747,6 +747,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
|
||||||
|
|
||||||
void begin_reversible_command (const std::string& cmd_name);
|
void begin_reversible_command (const std::string& cmd_name);
|
||||||
void begin_reversible_command (GQuark);
|
void begin_reversible_command (GQuark);
|
||||||
|
void abort_reversible_command ();
|
||||||
void commit_reversible_command (Command* cmd = 0);
|
void commit_reversible_command (Command* cmd = 0);
|
||||||
|
|
||||||
void add_command (Command *const cmd) {
|
void add_command (Command *const cmd) {
|
||||||
|
|
|
||||||
|
|
@ -2433,6 +2433,17 @@ Session::begin_reversible_command (GQuark q)
|
||||||
_current_trans_quarks.push_front (q);
|
_current_trans_quarks.push_front (q);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Session::abort_reversible_command ()
|
||||||
|
{
|
||||||
|
if (_current_trans != 0) {
|
||||||
|
_current_trans->clear();
|
||||||
|
delete _current_trans;
|
||||||
|
_current_trans = 0;
|
||||||
|
_current_trans_quarks.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Session::commit_reversible_command (Command *cmd)
|
Session::commit_reversible_command (Command *cmd)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue