Merge viewer-bear
commit
57f139b608
|
|
@ -337,7 +337,13 @@ BOOL LLFloaterExperienceProfile::postBuild()
|
|||
|
||||
LLEventPumps::instance().obtain("experience_permission").listen(mExperienceId.asString()+"-profile",
|
||||
boost::bind(&LLFloaterExperienceProfile::experiencePermission, getDerivedHandle<LLFloaterExperienceProfile>(this), _1));
|
||||
|
||||
|
||||
if (mPostEdit && mExperienceId.notNull())
|
||||
{
|
||||
mPostEdit = false;
|
||||
changeToEdit();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -624,12 +630,6 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience )
|
|||
mDirty=false;
|
||||
mForceClose = false;
|
||||
getChild<LLButton>(BTN_SAVE)->setEnabled(mDirty);
|
||||
|
||||
if (mPostEdit)
|
||||
{
|
||||
mPostEdit = false;
|
||||
changeToEdit();
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterExperienceProfile::setPreferences( const LLSD& content )
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ BOOL LLToolCompTranslate::handleHover(S32 x, S32 y, MASK mask)
|
|||
BOOL LLToolCompTranslate::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
mMouseDown = TRUE;
|
||||
gViewerWindow->pickAsync(x, y, mask, pickCallback, TRUE);
|
||||
gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -136,10 +136,7 @@ BOOL LLToolCamera::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
|
||||
gViewerWindow->hideCursor();
|
||||
|
||||
// <FS:Ansariel> Viewer-Bear merge (MAINT-5416: select rigged attachments): Since LL swapped parameter order, we need to take account of that or we produce fail like LL did :)
|
||||
//gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, TRUE);
|
||||
gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, FALSE, TRUE);
|
||||
// <FS:Ansariel>
|
||||
gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ FALSE, /*BOOL pick_rigged*/ FALSE, /*BOOL pick_unselectable*/ TRUE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ BOOL LLToolGrab::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
if (!gAgent.leftButtonGrabbed())
|
||||
{
|
||||
// can grab transparent objects (how touch event propagates, scripters rely on this)
|
||||
gViewerWindow->pickAsync(x, y, mask, pickCallback, TRUE);
|
||||
gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ TRUE);
|
||||
}
|
||||
mClickedInMouselook = gAgentCamera.cameraMouselook();
|
||||
return TRUE;
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
mMouseDownX = x;
|
||||
mMouseDownY = y;
|
||||
|
||||
//left mouse down always picks transparent
|
||||
//left mouse down always picks transparent (but see handleMouseUp)
|
||||
// mPick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE);
|
||||
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
|
||||
mPick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE, FALSE);
|
||||
|
|
@ -740,30 +740,52 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask)
|
|||
&& gAgentAvatarp
|
||||
&& !gAgentAvatarp->isSitting()
|
||||
&& !mBlockClickToWalk // another behavior hasn't cancelled click to walk
|
||||
&& !mPick.mPosGlobal.isExactlyZero() // valid coordinates for pick
|
||||
&& (mPick.mPickType == LLPickInfo::PICK_LAND // we clicked on land
|
||||
|| mPick.mObjectID.notNull())) // or on an object
|
||||
)
|
||||
{
|
||||
// handle special cases of steering picks
|
||||
LLViewerObject* avatar_object = mPick.getObject();
|
||||
// We may be doing click to walk, but we don't want to use a target on
|
||||
// a transparent object because the user thought they were clicking on
|
||||
// whatever they were seeing through it, so recompute what was clicked on
|
||||
// ignoring transparent objects
|
||||
LLPickInfo savedPick = mPick;
|
||||
mPick = gViewerWindow->pickImmediate(savedPick.mMousePt.mX, savedPick.mMousePt.mY,
|
||||
FALSE /* ignore transparent */,
|
||||
FALSE /* ignore particles */);
|
||||
|
||||
// get pointer to avatar
|
||||
while (avatar_object && !avatar_object->isAvatar())
|
||||
{
|
||||
avatar_object = (LLViewerObject*)avatar_object->getParent();
|
||||
}
|
||||
if (!mPick.mPosGlobal.isExactlyZero() // valid coordinates for pick
|
||||
&& (mPick.mPickType == LLPickInfo::PICK_LAND // we clicked on land
|
||||
|| mPick.mObjectID.notNull())) // or on an object
|
||||
{
|
||||
// handle special cases of steering picks
|
||||
LLViewerObject* avatar_object = mPick.getObject();
|
||||
|
||||
if (avatar_object && ((LLVOAvatar*)avatar_object)->isSelf())
|
||||
{
|
||||
const F64 SELF_CLICK_WALK_DISTANCE = 3.0;
|
||||
// pretend we picked some point a bit in front of avatar
|
||||
mPick.mPosGlobal = gAgent.getPositionGlobal() + LLVector3d(LLViewerCamera::instance().getAtAxis()) * SELF_CLICK_WALK_DISTANCE;
|
||||
}
|
||||
gAgentCamera.setFocusOnAvatar(TRUE, TRUE);
|
||||
walkToClickedLocation();
|
||||
LLFirstUse::notMoving(false);
|
||||
// get pointer to avatar
|
||||
while (avatar_object && !avatar_object->isAvatar())
|
||||
{
|
||||
avatar_object = (LLViewerObject*)avatar_object->getParent();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
if (avatar_object && ((LLVOAvatar*)avatar_object)->isSelf())
|
||||
{
|
||||
const F64 SELF_CLICK_WALK_DISTANCE = 3.0;
|
||||
// pretend we picked some point a bit in front of avatar
|
||||
mPick.mPosGlobal = gAgent.getPositionGlobal() + LLVector3d(LLViewerCamera::instance().getAtAxis()) * SELF_CLICK_WALK_DISTANCE;
|
||||
}
|
||||
gAgentCamera.setFocusOnAvatar(TRUE, TRUE);
|
||||
walkToClickedLocation();
|
||||
LLFirstUse::notMoving(false);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_DEBUGS("maint5901") << "walk target was "
|
||||
<< (mPick.mPosGlobal.isExactlyZero() ? "zero" : "not zero")
|
||||
<< ", pick type was " << (mPick.mPickType == LLPickInfo::PICK_LAND ? "land" : "not land")
|
||||
<< ", pick object was " << mPick.mObjectID
|
||||
<< LL_ENDL;
|
||||
// we didn't click to walk, so restore the original target
|
||||
mPick = savedPick;
|
||||
}
|
||||
}
|
||||
gViewerWindow->setCursor(UI_CURSOR_ARROW);
|
||||
if (hasMouseCapture())
|
||||
|
|
@ -797,12 +819,26 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask)
|
|||
|
||||
if (gSavedSettings.getBOOL("DoubleClickAutoPilot"))
|
||||
{
|
||||
// We may be doing double click to walk, but we don't want to use a target on
|
||||
// a transparent object because the user thought they were clicking on
|
||||
// whatever they were seeing through it, so recompute what was clicked on
|
||||
// ignoring transparent objects
|
||||
LLPickInfo savedPick = mPick;
|
||||
mPick = gViewerWindow->pickImmediate(savedPick.mMousePt.mX, savedPick.mMousePt.mY,
|
||||
FALSE /* ignore transparent */,
|
||||
FALSE /* ignore particles */);
|
||||
|
||||
if ((mPick.mPickType == LLPickInfo::PICK_LAND && !mPick.mPosGlobal.isExactlyZero()) ||
|
||||
(mPick.mObjectID.notNull() && !mPick.mPosGlobal.isExactlyZero()))
|
||||
{
|
||||
walkToClickedLocation();
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
// restore the original pick for any other purpose
|
||||
mPick = savedPick;
|
||||
}
|
||||
}
|
||||
else if (gSavedSettings.getBOOL("DoubleClickTeleport"))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue