mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
MCU: show warning message for empty views
If the user attempted to access a view with no tracks in it, it would show all blank screens. Now, it will show a temporary warning message and return to the previous view.
This commit is contained in:
parent
fb6e4b75ab
commit
2b2021d5e0
1 changed files with 6 additions and 0 deletions
|
|
@ -1860,6 +1860,12 @@ MackieControlProtocol::set_view_mode (ViewMode m)
|
|||
_view_mode = m;
|
||||
_last_bank[old_view_mode] = _current_initial_bank;
|
||||
|
||||
if (Sorted sorted = get_sorted_stripables(); sorted.empty()) {
|
||||
surfaces.front()->display_message_for ("This view is empty", 1000);
|
||||
_view_mode = old_view_mode;
|
||||
return;
|
||||
}
|
||||
|
||||
if (switch_banks(_last_bank[m], true)) {
|
||||
_view_mode = old_view_mode;
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue