Show Trigger Patch Selector on selection
This commit is contained in:
parent
a4fd29fa7d
commit
42df6be0fa
|
@ -390,6 +390,8 @@ TriggerPage::selection_changed ()
|
|||
|
||||
_parameter_box.hide ();
|
||||
|
||||
bool hide_patch_selector = true;
|
||||
|
||||
if (!selection.triggers.empty ()) {
|
||||
TriggerSelection ts = selection.triggers;
|
||||
TriggerEntry* entry = *ts.begin ();
|
||||
|
@ -408,6 +410,20 @@ TriggerPage::selection_changed ()
|
|||
}
|
||||
}
|
||||
_parameter_box.show ();
|
||||
|
||||
if (boost::dynamic_pointer_cast<MIDITrigger> (trigger)) {
|
||||
/* TODO @ben: only show optionally. checkbox? */
|
||||
hide_patch_selector = false;
|
||||
SessionObject* obj = trigger->box ().owner ();
|
||||
boost::shared_ptr<Stripable> stripable = _session->stripable_by_id (obj->id ());
|
||||
_patch_change_window.reset (boost::dynamic_pointer_cast<Route> (stripable), boost::dynamic_pointer_cast<MIDITrigger> (trigger));
|
||||
_patch_change_window.present ();
|
||||
}
|
||||
}
|
||||
|
||||
if (hide_patch_selector) {
|
||||
_patch_change_window.hide ();
|
||||
_patch_change_window.clear (); /* drop route/trigger ref */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "midi_region_operations_box.h"
|
||||
#include "midi_region_properties_box.h"
|
||||
#include "midi_trigger_properties_box.h"
|
||||
#include "patch_change_widget.h"
|
||||
#include "route_processor_selection.h"
|
||||
#include "slot_properties_box.h"
|
||||
#include "trigger_clip_picker.h"
|
||||
|
@ -137,6 +138,7 @@ private:
|
|||
MidiClipEditorBox _midi_trim_box;
|
||||
#endif
|
||||
|
||||
PatchChangeTriggerWindow _patch_change_window;
|
||||
RouteProcessorSelection _selection;
|
||||
std::list<TriggerStrip*> _strips;
|
||||
sigc::connection _fast_screen_update_connection;
|
||||
|
|
Loading…
Reference in New Issue
Block a user