diff --git a/plugins/confirm.cpp b/plugins/confirm.cpp index e89a00b94..e3e8308a4 100644 --- a/plugins/confirm.cpp +++ b/plugins/confirm.cpp @@ -405,7 +405,10 @@ class squad_disband_confirmation : public confirmationnum_squads && key == df::interface_key::D_MILITARY_DISBAND_SQUAD; + return screen->page == df::viewscreen_layer_militaryst::T_page::Positions && + screen->num_squads && + !screen->in_rename_alert && + key == df::interface_key::D_MILITARY_DISBAND_SQUAD; } virtual string get_id() { return "squad-disband"; } virtual string get_title() { return "Disband squad"; }