From cdb0911a7897253d269a4c8d4a5532c245bc6b32 Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Wed, 3 Mar 2010 11:39:45 +0200 Subject: fix for EXT-4469 Fast Timers: Minimize and Close icons do not work --HG-- branch : product-engine --- indra/newview/llfasttimerview.cpp | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfasttimerview.cpp') diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 4fa97e789b..48fc60d529 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -44,6 +44,7 @@ #include "llfontgl.h" #include "llsdserialize.h" #include "lltooltip.h" +#include "llbutton.h" #include "llappviewer.h" #include "llviewertexturelist.h" @@ -99,6 +100,8 @@ LLFastTimerView::LLFastTimerView(const LLRect& rect) FTV_NUM_TIMERS = LLFastTimer::NamedTimer::instanceCount(); mPrintStats = -1; mAverageCyclesPerTimer = 0; + setCanMinimize(false); + setCanClose(true); } @@ -139,6 +142,18 @@ LLFastTimer::NamedTimer* LLFastTimerView::getLegendID(S32 y) BOOL LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask) { + + { + S32 local_x = x - mButtons[BUTTON_CLOSE]->getRect().mLeft; + S32 local_y = y - mButtons[BUTTON_CLOSE]->getRect().mBottom; + if(mButtons[BUTTON_CLOSE]->getVisible() + && mButtons[BUTTON_CLOSE]->pointInView(local_x, local_y) ) + { + return LLFloater::handleMouseDown(x, y, mask);; + } + } + + if (x < mBarRect.mLeft) { LLFastTimer::NamedTimer* idp = getLegendID(y); @@ -188,11 +203,25 @@ BOOL LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask) BOOL LLFastTimerView::handleMouseUp(S32 x, S32 y, MASK mask) { + { + S32 local_x = x - mButtons[BUTTON_CLOSE]->getRect().mLeft; + S32 local_y = y - mButtons[BUTTON_CLOSE]->getRect().mBottom; + if(mButtons[BUTTON_CLOSE]->getVisible() + && mButtons[BUTTON_CLOSE]->pointInView(local_x, local_y) ) + { + return LLFloater::handleMouseUp(x, y, mask);; + } + } return FALSE; } BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) { + /*if(y>getRect().getHeight()-20) + { + return LLFloater::handleMouseDown(x, y, mask); + }*/ + mHoverTimer = NULL; mHoverID = NULL; @@ -1191,5 +1220,8 @@ void LLFastTimerView::doAnalysis(std::string baseline, std::string target, std:: return ; } } - +void LLFastTimerView::onClickCloseBtn() +{ + setVisible(false); +} -- cgit v1.2.3 From 0a16e7627ed0c54510c4a641be30e6dd554932db Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Wed, 3 Mar 2010 12:40:18 +0200 Subject: cleanup --HG-- branch : product-engine --- indra/newview/llfasttimerview.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'indra/newview/llfasttimerview.cpp') diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 48fc60d529..8bc3b5a75f 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -217,11 +217,6 @@ BOOL LLFastTimerView::handleMouseUp(S32 x, S32 y, MASK mask) BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) { - /*if(y>getRect().getHeight()-20) - { - return LLFloater::handleMouseDown(x, y, mask); - }*/ - mHoverTimer = NULL; mHoverID = NULL; -- cgit v1.2.3