From d3233e787aaf1ba0558a714d5216ea70c7249c36 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 3 Jul 2023 23:29:01 +0300 Subject: SL-19929 New inventory feature notification should appear on top --- indra/newview/llfloaternewfeaturenotification.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'indra/newview/llfloaternewfeaturenotification.cpp') diff --git a/indra/newview/llfloaternewfeaturenotification.cpp b/indra/newview/llfloaternewfeaturenotification.cpp index e04b1a5da5..7c3fe8cdc8 100644 --- a/indra/newview/llfloaternewfeaturenotification.cpp +++ b/indra/newview/llfloaternewfeaturenotification.cpp @@ -30,7 +30,7 @@ LLFloaterNewFeatureNotification::LLFloaterNewFeatureNotification(const LLSD& key) - : LLFloater(key) + : LLFloater(key) { } @@ -40,24 +40,29 @@ LLFloaterNewFeatureNotification::~LLFloaterNewFeatureNotification() BOOL LLFloaterNewFeatureNotification::postBuild() { - setCanDrag(FALSE); - getChild("close_btn")->setCommitCallback(boost::bind(&LLFloaterNewFeatureNotification::onCloseBtn, this)); - return TRUE; + setCanDrag(FALSE); + getChild("close_btn")->setCommitCallback(boost::bind(&LLFloaterNewFeatureNotification::onCloseBtn, this)); + return TRUE; } void LLFloaterNewFeatureNotification::onOpen(const LLSD& key) { - centerOnScreen(); + centerOnScreen(); } void LLFloaterNewFeatureNotification::onCloseBtn() { - closeFloater(); + closeFloater(); } void LLFloaterNewFeatureNotification::centerOnScreen() { - LLVector2 window_size = LLUI::getInstance()->getWindowSize(); - centerWithin(LLRect(0, 0, ll_round(window_size.mV[VX]), ll_round(window_size.mV[VY]))); + LLVector2 window_size = LLUI::getInstance()->getWindowSize(); + centerWithin(LLRect(0, 0, ll_round(window_size.mV[VX]), ll_round(window_size.mV[VY]))); + LLFloaterView* parent = dynamic_cast(getParent()); + if (parent) + { + parent->bringToFront(this); + } } -- cgit v1.3