13
0

trigger_ui: cancel audition when you drag+drop a clip so you can play with it

This commit is contained in:
Ben Loftis 2022-01-17 19:47:49 -06:00
parent c6a3c54907
commit 0eb44c3be9
2 changed files with 8 additions and 0 deletions

View File

@ -135,6 +135,7 @@ TriggerClipPicker::TriggerClipPicker ()
_view.signal_row_collapsed ().connect (sigc::mem_fun (*this, &TriggerClipPicker::row_collapsed));
_view.signal_drag_data_get ().connect (sigc::mem_fun (*this, &TriggerClipPicker::drag_data_get));
_view.signal_cursor_changed ().connect (sigc::mem_fun (*this, &TriggerClipPicker::cursor_changed));
_view.signal_drag_end ().connect (sigc::mem_fun (*this, &TriggerClipPicker::drag_end));
Config->ParameterChanged.connect (_config_connection, invalidator (*this), boost::bind (&TriggerClipPicker::parameter_changed, this, _1), gui_context ());
@ -316,6 +317,12 @@ TriggerClipPicker::maybe_add_dir (std::string const& dir)
* Treeview Callbacks
*/
void
TriggerClipPicker::drag_end (Glib::RefPtr<Gdk::DragContext> const&)
{
_session->cancel_audition ();
}
void
TriggerClipPicker::cursor_changed ()
{

View File

@ -56,6 +56,7 @@ private:
bool test_expand (Gtk::TreeModel::iterator const&, Gtk::TreeModel::Path const&);
void row_collapsed (Gtk::TreeModel::iterator const&, Gtk::TreeModel::Path const&);
void drag_data_get (Glib::RefPtr<Gdk::DragContext> const&, Gtk::SelectionData&, guint, guint);
void drag_end (Glib::RefPtr<Gdk::DragContext> const&);
void maybe_add_dir (std::string const&);
void audition_selected ();
void audition (std::string const&);