Fix dismissal of current screen when zooming to items

develop
lethosor 2015-07-29 11:22:38 -04:00
parent cc5045d6df
commit 7fc682b199
1 changed files with 6 additions and 0 deletions

@ -802,6 +802,12 @@ public:
return;
Screen::dismiss(this);
auto vs = Gui::getCurViewscreen(true);
while (vs && !virtual_cast<df::viewscreen_dwarfmodest>(vs))
{
Screen::dismiss(vs);
vs = vs->parent;
}
// Could be clever here, if item is in a container, to look inside the container.
// But that's different for built containers vs bags/pots in stockpiles.
send_key(interface_key::D_LOOK);