From 05282cfd45b89abbc8efae6ee7bdfe7122bbec10 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Tue, 16 Dec 2025 04:57:11 +0200 Subject: #1112 Fix wrong option having size controls in Snapshot to Inventory --- indra/newview/llpanelsnapshotinventory.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp index b81b891685..7396f079b0 100644 --- a/indra/newview/llpanelsnapshotinventory.cpp +++ b/indra/newview/llpanelsnapshotinventory.cpp @@ -110,7 +110,11 @@ void LLPanelSnapshotInventory::updateControls(const LLSD& info) void LLPanelSnapshotInventory::onResolutionCommit(LLUICtrl* ctrl) { - bool current_window_selected = (getChild(getImageSizeComboName())->getCurrentIndex() == 3); + LLComboBox* combo = getChild(getImageSizeComboName()); + // Current window likely won't ever change position from being the penultimate item + // Custom window is last item + S32 curent_window_index = combo->getItemCount() - 2; + bool current_window_selected = (combo->getCurrentIndex() == curent_window_index); getChild(getWidthSpinnerName())->setVisible(!current_window_selected); getChild(getHeightSpinnerName())->setVisible(!current_window_selected); } -- cgit v1.2.3