From 07a310b0f28cbcdf47cc33220e2f32f9724591d9 Mon Sep 17 00:00:00 2001 From: lethosor Date: Wed, 11 Nov 2015 23:14:30 -0500 Subject: [PATCH] Prevent "confirm squad-disband" from triggering unnecessarily --- plugins/confirm.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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"; }