From 4e08357aaf3dc222f7d5dac4bf20e88f9b5d2d5d Mon Sep 17 00:00:00 2001 From: lethosor Date: Tue, 8 Dec 2020 23:09:07 -0500 Subject: [PATCH] search: reset when screen is dismissed, even if it's still present under gview Fixes #1725 --- docs/changelog.txt | 1 + plugins/search.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changelog.txt b/docs/changelog.txt index 854814230..17649aaae 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -42,6 +42,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: - `dwarfmonitor`: fixed a crash when opening the ``prefs`` screen if units have vague preferences - `embark-assistant`: fixed an issue causing incursion resource matching (e.g. sand/clay) to skip some tiles if those resources were provided only through incursions - `embark-assistant`: corrected river size determination by performing it at the MLT level rather than the world tile one +- `search`: fixed an issue where search options might not display if screens were destroyed and recreated programmatically (e.g. with `quickfort`) - `zone`: fixed an issue causing the ``enumnick`` subcommand to run when attempting to run ``assign``, ``unassign``, or ``slaughter`` ## Misc Improvements diff --git a/plugins/search.cpp b/plugins/search.cpp index f053967d8..27958f6dc 100644 --- a/plugins/search.cpp +++ b/plugins/search.cpp @@ -97,7 +97,7 @@ void make_text_dim(int x1, int x2, int y) static bool is_live_screen(const df::viewscreen *screen) { for (df::viewscreen *cur = &gview->view; cur; cur = cur->child) - if (cur == screen) + if (cur == screen && cur->breakdown_level == interface_breakdown_types::NONE) return true; return false; }