SL-17436 Tools floater drops negative Z position for attachments

meow-7.2.2
Andrey Kleshchev 2022-05-20 23:19:26 +03:00
parent 0c169dd37a
commit 48d2836ce6
2 changed files with 6 additions and 5 deletions

View File

@ -1661,13 +1661,13 @@ void LLPanelObject::sendPosition(BOOL btn_down)
if (!regionp) return;
// Clamp the Z height
const F32 height = newpos.mV[VZ];
const F32 min_height = LLWorld::getInstance()->getMinAllowedZ(mObject, mObject->getPositionGlobal());
const F32 max_height = LLWorld::getInstance()->getRegionMaxHeight();
if (!mObject->isAttachment())
{
// Clamp the Z height
const F32 height = newpos.mV[VZ];
const F32 min_height = LLWorld::getInstance()->getMinAllowedZ(mObject, mObject->getPositionGlobal());
const F32 max_height = LLWorld::getInstance()->getRegionMaxHeight();
if ( height < min_height)
{
newpos.mV[VZ] = min_height;

View File

@ -1505,6 +1505,7 @@ even though the user gets a free copy.
layout="topleft"
left_delta="0"
max_val="4096"
min_val="-32"
name="Pos Z"
text_enabled_color="0 0.8 1 .65"
top_pad="3"