confirm haul-delete: Additional UI state restrictions

Fixes #744
develop
lethosor 2015-11-10 17:24:10 -05:00
parent 07839c511a
commit 7663a9a7a7
1 changed files with 6 additions and 1 deletions

@ -323,7 +323,12 @@ class hauling_route_delete_confirmation : public confirmation<df::viewscreen_dwa
public:
virtual bool intercept_key (df::interface_key key)
{
if (ui->main.mode == ui_sidebar_mode::Hauling && ui->hauling.view_routes.size())
if (ui->main.mode == ui_sidebar_mode::Hauling &&
ui->hauling.view_routes.size() &&
!ui->hauling.in_name &&
!ui->hauling.in_stop &&
!ui->hauling.in_assign_vehicle
)
return key == df::interface_key::D_HAULING_REMOVE;
return false;
}