Remove redundant pick hover logic. Already handled in LLToolPie.

This commit is contained in:
Shyotl
2019-04-11 23:51:05 -05:00
parent 3724cf0e68
commit ccacdf7e6b
2 changed files with 0 additions and 34 deletions

View File

@@ -1676,7 +1676,6 @@ LLViewerWindow::LLViewerWindow(
mHideCursorPermanent( FALSE ),
mCursorHidden(FALSE),
mIgnoreActivate( FALSE ),
mHoverPick(),
mResDirty(false),
//mStatesDirty(false), //Singu Note: No longer needed. State update is now in restoreGL.
mIsFullscreenChecked(false),
@@ -3416,40 +3415,9 @@ void LLViewerWindow::updateUI()
{
LLSelectMgr::getInstance()->deselectUnused();
}
// per frame picking - for tooltips and changing cursor over interactive objects
static S32 previous_x = -1;
static S32 previous_y = -1;
static BOOL mouse_moved_since_pick = FALSE;
if ((previous_x != x) || (previous_y != y))
mouse_moved_since_pick = TRUE;
static const LLCachedControl<F32> picks_moving("PicksPerSecondMouseMoving",5.f);
static const LLCachedControl<F32> picks_stationary("PicksPerSecondMouseStationary",0.f);
if( !getCursorHidden()
// When in-world media is in focus, pick every frame so that browser mouse-overs, dragging scrollbars, etc. work properly.
&& (LLViewerMediaFocus::getInstance()->getFocus()
|| ((mouse_moved_since_pick) && (picks_moving > 0.0) && (mPickTimer.getElapsedTimeF32() > 1.0f / picks_moving))
|| ((!mouse_moved_since_pick) && (picks_stationary > 0.0) && (mPickTimer.getElapsedTimeF32() > 1.0f / picks_stationary))))
{
mouse_moved_since_pick = FALSE;
mPickTimer.reset();
pickAsync(getCurrentMouseX(), getCurrentMouseY(), mask, hoverPickCallback, TRUE, TRUE);
}
previous_x = x;
previous_y = y;
return;
}
/* static */
void LLViewerWindow::hoverPickCallback(const LLPickInfo& pick_info)
{
gViewerWindow->mHoverPick = pick_info;
}
void LLViewerWindow::updateLayout()
{
static const LLCachedControl<bool> freeze_time("FreezeTime",0);

View File

@@ -250,7 +250,6 @@ public:
BOOL getRightMouseDown() const { return mRightMouseDown; }
const LLPickInfo& getLastPick() const { return mLastPick; }
const LLPickInfo& getHoverPick() const { return mHoverPick; }
void setup2DViewport(S32 x_offset = 0, S32 y_offset = 0);
void setup3DViewport(S32 x_offset = 0, S32 y_offset = 0);
@@ -464,7 +463,6 @@ protected:
BOOL mHideCursorPermanent; // true during drags, mouselook
BOOL mCursorHidden;
LLPickInfo mLastPick;
LLPickInfo mHoverPick;
std::vector<LLPickInfo> mPicks;
LLRect mPickScreenRegion; // area of frame buffer for rendering pick frames (generally follows mouse to avoid going offscreen)
LLTimer mPickTimer; // timer for scheduling n picks per second