mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 16:24:57 +01:00
update SFDB settings when track selection changes
This commit is contained in:
parent
cff0852df9
commit
dec4790dff
1 changed files with 27 additions and 0 deletions
|
|
@ -41,6 +41,7 @@
|
||||||
#include "editor_regions.h"
|
#include "editor_regions.h"
|
||||||
#include "editor_cursors.h"
|
#include "editor_cursors.h"
|
||||||
#include "midi_region_view.h"
|
#include "midi_region_view.h"
|
||||||
|
#include "sfdb_ui.h"
|
||||||
|
|
||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
|
|
||||||
|
|
@ -1006,6 +1007,32 @@ Editor::track_selection_changed ()
|
||||||
/* notify control protocols */
|
/* notify control protocols */
|
||||||
|
|
||||||
ControlProtocol::TrackSelectionChanged (routes);
|
ControlProtocol::TrackSelectionChanged (routes);
|
||||||
|
|
||||||
|
if (sfbrowser) {
|
||||||
|
uint32_t audio_track_cnt = 0;
|
||||||
|
uint32_t midi_track_cnt = 0;
|
||||||
|
|
||||||
|
for (TrackSelection::iterator x = selection->tracks.begin(); x != selection->tracks.end(); ++x) {
|
||||||
|
AudioTimeAxisView* atv = dynamic_cast<AudioTimeAxisView*>(*x);
|
||||||
|
|
||||||
|
if (atv) {
|
||||||
|
if (atv->is_audio_track()) {
|
||||||
|
audio_track_cnt++;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
MidiTimeAxisView* mtv = dynamic_cast<MidiTimeAxisView*>(*x);
|
||||||
|
|
||||||
|
if (mtv) {
|
||||||
|
if (mtv->is_midi_track()) {
|
||||||
|
midi_track_cnt++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sfbrowser->reset (audio_track_cnt, midi_track_cnt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue