From bdf8993c485446009751021f20b6c146168fbfc0 Mon Sep 17 00:00:00 2001 From: Ted John Date: Wed, 2 Aug 2017 21:28:23 +0100 Subject: [PATCH] Fix #6111: Mute button always visible in editor --- distribution/changelog.txt | 1 + src/openrct2/windows/top_toolbar.c | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 154f68d091..783a45ed6a 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -27,6 +27,7 @@ - Fix: [#6026] 'Select ride to advertise' dropdown does not display all items. - Fix: [#6052] Unable to place entrance/exit on certain ride types. - Fix: [#6071] Quick demolish can delete protected ride. +- Fix: [#6111] Mute button always visible in editor. - Improved: [#2223] Change mountain tool to ignore higher surrounding tiles. - Improved: [#4301] Leading and trailing whitespace in player name is now removed. - Improved: [#5859] OpenGL rendering performance diff --git a/src/openrct2/windows/top_toolbar.c b/src/openrct2/windows/top_toolbar.c index f4f6d9d338..1941984799 100644 --- a/src/openrct2/windows/top_toolbar.c +++ b/src/openrct2/windows/top_toolbar.c @@ -678,6 +678,11 @@ static void window_top_toolbar_invalidate(rct_window *w) window_top_toolbar_widgets[WIDX_NEWS].type = WWT_TRNBTN; window_top_toolbar_widgets[WIDX_NETWORK].type = WWT_TRNBTN; + if (!gConfigInterface.toolbar_show_mute) + { + window_top_toolbar_widgets[WIDX_MUTE].type = WWT_EMPTY; + } + if (gScreenFlags & (SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) { window_top_toolbar_widgets[WIDX_PAUSE].type = WWT_EMPTY; window_top_toolbar_widgets[WIDX_RIDES].type = WWT_EMPTY; @@ -723,9 +728,6 @@ static void window_top_toolbar_invalidate(rct_window *w) if (!gConfigInterface.toolbar_show_news) window_top_toolbar_widgets[WIDX_NEWS].type = WWT_EMPTY; - if (!gConfigInterface.toolbar_show_mute) - window_top_toolbar_widgets[WIDX_MUTE].type = WWT_EMPTY; - switch (network_get_mode()) { case NETWORK_MODE_NONE: window_top_toolbar_widgets[WIDX_NETWORK].type = WWT_EMPTY;