From 29de643ffd09257844156c3414f800d84092d790 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 26 Apr 2022 21:59:36 +0300 Subject: SL-15383 Controls table was empty after canceling advanced graphical settings Also causes crashes on SearchableControl::setHighlighted due to views not being there --- indra/newview/llfloaterpreference.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 9064a65d05..9e1829fd8b 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -3006,10 +3006,15 @@ void LLPanelPreferenceControls::cancel() if (mConflictHandler[i].hasUnsavedChanges()) { mConflictHandler[i].clear(); + if (mEditingMode == i) + { + // cancel() can be called either when preferences floater closes + // or when child floater closes (like advanced graphical settings) + // in which case we need to clear and repopulate table + regenerateControls(); + } } } - pControlsTable->clearRows(); - pControlsTable->clearColumns(); } void LLPanelPreferenceControls::saveSettings() -- cgit v1.2.3