summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterhowto.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-05-06 21:57:46 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-05-06 21:57:46 +0300
commitcb42bc2823931b84ce079423a471a332dc332b0c (patch)
tree357fa813f6cd435ed85d97b727fd3d0f2266154c /indra/newview/llfloaterhowto.cpp
parentcfb6ca569b2c834520ce50564e857dfc06831675 (diff)
SL-15168 Viewer side functionality for guidebook window opening #2
Diffstat (limited to 'indra/newview/llfloaterhowto.cpp')
-rw-r--r--indra/newview/llfloaterhowto.cpp17
1 files changed, 10 insertions, 7 deletions
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<LLLayoutStack>("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<LLLayoutStack>("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()