summaryrefslogtreecommitdiff
path: root/gtk2_ardour/step_editor.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2018-12-22 16:48:16 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2018-12-22 16:48:16 -0500
commitbc1a7ec9e59e03dc630cbfb2e702ed0fe5233516 (patch)
tree7e2ebfbfc8a90f8a6b420fd52b165f415b4ed589 /gtk2_ardour/step_editor.cc
parent933b2b1a9c346a09e0539816a6ca1d1d5f945c85 (diff)
deal with end-of-step-editing in a better way
Diffstat (limited to 'gtk2_ardour/step_editor.cc')
-rw-r--r--gtk2_ardour/step_editor.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/gtk2_ardour/step_editor.cc b/gtk2_ardour/step_editor.cc
index d173023714..1b017bbd53 100644
--- a/gtk2_ardour/step_editor.cc
+++ b/gtk2_ardour/step_editor.cc
@@ -73,8 +73,8 @@ StepEditor::start_step_editing ()
assert (step_edit_region_view);
StepEntry::instance().set_step_editor (this);
- StepEntry::instance().signal_delete_event().connect (sigc::mem_fun (*this, &StepEditor::step_entry_hidden));
- StepEntry::instance(). signal_hide().connect (sigc::mem_fun (*this, &StepEditor::step_entry_hide));
+ delete_connection = StepEntry::instance().signal_delete_event().connect (sigc::mem_fun (*this, &StepEditor::step_entry_hidden));
+ hide_connection = StepEntry::instance(). signal_hide().connect (sigc::mem_fun (*this, &StepEditor::step_entry_done));
step_edit_region_view->show_step_edit_cursor (step_edit_beat_pos);
step_edit_region_view->set_step_edit_cursor_width (StepEntry::instance().note_length());
@@ -148,13 +148,15 @@ StepEditor::reset_step_edit_beat_pos ()
bool
StepEditor::step_entry_hidden (GdkEventAny*)
{
- step_entry_hide ();
- return true; // XXX remember position ?!
+ step_entry_done ();
+ return true;
}
void
-StepEditor::step_entry_hide ()
+StepEditor::step_entry_done ()
{
+ hide_connection.disconnect ();
+ delete_connection.disconnect ();
/* everything else will follow the change in the model */
_track->set_step_editing (false);
}