From cb42bc2823931b84ce079423a471a332dc332b0c Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 6 May 2021 21:57:46 +0300 Subject: SL-15168 Viewer side functionality for guidebook window opening #2 --- indra/newview/llfloaterhowto.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'indra/newview/llfloaterhowto.cpp') diff --git a/indra/newview/llfloaterhowto.cpp b/indra/newview/llfloaterhowto.cpp index 9db733db25..ef40060807 100644 --- a/indra/newview/llfloaterhowto.cpp +++ b/indra/newview/llfloaterhowto.cpp @@ -61,13 +61,16 @@ void LLFloaterHowTo::onOpen(const LLSD& key) LLFloaterWebContent::onOpen(p); - // Elements from LLFloaterWebContent did not pick up restored size (save_rect) of LLFloaterHowTo - // set the stack size and position (alternative to preferred_media_size) - LLLayoutStack *stack = getChild("stack1"); - LLRect stack_rect = stack->getRect(); - stack->reshape(STACK_WIDTH, STACK_HEIGHT); - stack->setOrigin(stack_rect.mLeft, stack_rect.mTop - STACK_HEIGHT); - stack->updateLayout(); + if (p.preferred_media_size().isEmpty()) + { + // Elements from LLFloaterWebContent did not pick up restored size (save_rect) of LLFloaterHowTo + // set the stack size and position (alternative to preferred_media_size) + LLLayoutStack *stack = getChild("stack1"); + LLRect stack_rect = stack->getRect(); + stack->reshape(STACK_WIDTH, STACK_HEIGHT); + stack->setOrigin(stack_rect.mLeft, stack_rect.mTop - STACK_HEIGHT); + stack->updateLayout(); + } } LLFloaterHowTo* LLFloaterHowTo::getInstance() -- cgit v1.2.3