diff --git a/plugins/stocks.cpp b/plugins/stocks.cpp index 0f6039bfc..d6611e1de 100644 --- a/plugins/stocks.cpp +++ b/plugins/stocks.cpp @@ -802,6 +802,12 @@ public: return; Screen::dismiss(this); + auto vs = Gui::getCurViewscreen(true); + while (vs && !virtual_cast(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);