summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-12-04 14:52:19 -0800
committerMerov Linden <merov@lindenlab.com>2012-12-04 14:52:19 -0800
commit90f9f5dbad8a0e6dc20b3f7fc58527e572a6b3f7 (patch)
tree2b6d67485b851d3c9a7adcad4709fed64b11c428 /indra/llui
parentb43c8afc36a11c34fa76443be85430cac6c72c42 (diff)
parent3f6f374c2566c85e1a9480da674bfc2172dd9162 (diff)
Pull merge from richard/viewer-chui
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llbutton.cpp2
-rw-r--r--indra/llui/llflashtimer.cpp9
-rw-r--r--indra/llui/llflashtimer.h6
-rwxr-xr-xindra/llui/llfolderviewitem.cpp7
4 files changed, 21 insertions, 3 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 97547208ec..f82cdc64a9 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -286,7 +286,7 @@ LLButton::~LLButton()
if (mFlashingTimer)
{
- delete mFlashingTimer;
+ mFlashingTimer->unset();
}
}
diff --git a/indra/llui/llflashtimer.cpp b/indra/llui/llflashtimer.cpp
index de7a4ab265..e49628acd5 100644
--- a/indra/llui/llflashtimer.cpp
+++ b/indra/llui/llflashtimer.cpp
@@ -35,6 +35,7 @@ LLFlashTimer::LLFlashTimer(callback_t cb, S32 count, F32 period)
, mCurrentTickCount(0)
, mIsFlashingInProgress(false)
, mIsCurrentlyHighlighted(false)
+ , mUnset(false)
{
mEventTimer.stop();
@@ -48,6 +49,12 @@ LLFlashTimer::LLFlashTimer(callback_t cb, S32 count, F32 period)
}
}
+void LLFlashTimer::unset()
+{
+ mUnset = true;
+ mCallback = NULL;
+}
+
BOOL LLFlashTimer::tick()
{
mIsCurrentlyHighlighted = !mIsCurrentlyHighlighted;
@@ -62,7 +69,7 @@ BOOL LLFlashTimer::tick()
stopFlashing();
}
- return FALSE;
+ return mUnset;
}
void LLFlashTimer::startFlashing()
diff --git a/indra/llui/llflashtimer.h b/indra/llui/llflashtimer.h
index 5c8860b097..c60f99a8ea 100644
--- a/indra/llui/llflashtimer.h
+++ b/indra/llui/llflashtimer.h
@@ -52,6 +52,11 @@ public:
bool isFlashingInProgress();
bool isCurrentlyHighlighted();
+ /*
+ * Use this instead of deleting this object.
+ * The next call to tick() will return true and that will destroy this object.
+ */
+ void unset();
private:
callback_t mCallback;
@@ -62,6 +67,7 @@ private:
S32 mCurrentTickCount;
bool mIsCurrentlyHighlighted;
bool mIsFlashingInProgress;
+ bool mUnset;
};
#endif /* LL_FLASHTIMER_H */
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 261f53d6b6..9b54a7a467 100755
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -501,7 +501,7 @@ BOOL LLFolderViewItem::handleMouseDown( S32 x, S32 y, MASK mask )
// No handler needed for focus lost since this class has no
// state that depends on it.
gFocusMgr.setMouseCapture( this );
-
+
if (!mIsSelected)
{
if(mask & MASK_CONTROL)
@@ -518,6 +518,11 @@ BOOL LLFolderViewItem::handleMouseDown( S32 x, S32 y, MASK mask )
}
make_ui_sound("UISndClick");
}
+ //Just re-select the item since it is clicked without ctrl or shift
+ else if(!(mask & (MASK_CONTROL | MASK_SHIFT)))
+ {
+ getRoot()->setSelection(this, FALSE);
+ }
else
{
mSelectPending = TRUE;