Allow calling Dropdown::set_active from a signal handler
This breaks a potential recursion when set_active() is called
from activate_item(). See also 88fc22610
This commit is contained in:
parent
b523583bb4
commit
08a9368adf
|
@ -83,6 +83,11 @@ ArdourDropdown::on_button_press_event (GdkEventButton* ev)
|
|||
void
|
||||
ArdourDropdown::set_active (std::string const& text)
|
||||
{
|
||||
const MenuItem* current_active = _menu.get_active();
|
||||
if (current_active && current_active->get_label() == text) {
|
||||
set_text (text);
|
||||
return;
|
||||
}
|
||||
using namespace Menu_Helpers;
|
||||
const MenuList& items = _menu.items ();
|
||||
int c = 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user