diff options
| author | Callum Prentice <callum@lindenlab.com> | 2023-02-13 14:12:59 -0800 |
|---|---|---|
| committer | Callum Prentice <callum@lindenlab.com> | 2023-02-13 14:12:59 -0800 |
| commit | 422cd237dff521b35521292a8fccca61eaece23a (patch) | |
| tree | ec275907b06d8839b2c6f984a0c7ad11719efc77 /indra/newview/llpanelobject.cpp | |
| parent | f3cd329b585ef55a66f2a824f010d1a54d67d8d2 (diff) | |
| parent | 8d21d29bd7fa038db632ff90fb0e1207d0713ca2 (diff) | |
Fix up a couple of tiny merge conflicts after a merge with main
Diffstat (limited to 'indra/newview/llpanelobject.cpp')
| -rw-r--r-- | indra/newview/llpanelobject.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 0bfc1297d3..2da431955f 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -93,6 +93,8 @@ enum { MI_HOLE_COUNT }; +const F32 MAX_ATTACHMENT_DIST = 3.5f; // meters + //static const std::string LEGACY_FULLBRIGHT_DESC =LLTrans::getString("Fullbright"); BOOL LLPanelObject::postBuild() @@ -1685,6 +1687,16 @@ void LLPanelObject::sendPosition(BOOL btn_down) mCtrlPosZ->set(LLWorld::getInstance()->resolveLandHeightAgent(newpos) + 1.f); } } + else + { + if (newpos.length() > MAX_ATTACHMENT_DIST) + { + newpos.clampLength(MAX_ATTACHMENT_DIST); + mCtrlPosX->set(newpos.mV[VX]); + mCtrlPosY->set(newpos.mV[VY]); + mCtrlPosZ->set(newpos.mV[VZ]); + } + } // Make sure new position is in a valid region, so the object // won't get dumped by the simulator. @@ -2119,7 +2131,7 @@ bool LLPanelObject::menuEnableItem(const LLSD& userdata) } else if (command == "params_paste") { - return mClipboardParams.isMap() && !mClipboardParams.emptyMap(); + return mClipboardParams.isMap() && (mClipboardParams.size() != 0); } // copy options else if (command == "psr_copy") @@ -2191,6 +2203,10 @@ void LLPanelObject::onPastePos() mClipboardPos.mV[VY] = llclamp(mClipboardPos.mV[VY], 0.f, max_width); //height will get properly clamped by sendPosition } + else + { + mClipboardPos.clampLength(MAX_ATTACHMENT_DIST); + } mCtrlPosX->set( mClipboardPos.mV[VX] ); mCtrlPosY->set( mClipboardPos.mV[VY] ); |
