ui: read the signal count under the lock in the badge bar; validate the drop payload
This commit is contained in:
1 parent
5242babf99
commit
dad424f1de
3 files changed
+20
-5
No files matched your search
+8
-2
@@ -4654,10 +4654,16 @@ void run_app_action(App& app, AppAction action) {
|
||||
toggle(app.cursors_toggle);
|
||||
break;
|
||||
case AppAction::ShowMeasure: dock_show_section(app, "measure"); break;
|
||||
case AppAction::ShowSignals:
|
||||
case AppAction::ShowSignals: {
|
||||
// The `+` badge is insensitive without signals; so is its shortcut.
|
||||
if (!app.model->signals().empty()) slideover_toggle(app, "signals");
|
||||
bool have_signals = false;
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(app.model->mutex());
|
||||
have_signals = !app.model->signals().empty();
|
||||
}
|
||||
if (have_signals) slideover_toggle(app, "signals");
|
||||
break;
|
||||
}
|
||||
case AppAction::LayoutEditor:
|
||||
toggle(app.layout_toggle);
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user