Skip to content
Snippets Groups Projects
Commit 67771646 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Fix build floater position spinners on attachments

parent b6b4938f
No related branches found
No related tags found
No related merge requests found
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
// [/RLVa:KB] // [/RLVa:KB]
#include "lldrawpool.h" #include "lldrawpool.h"
#include "llviewerjointattachment.h"
// //
// Constants // Constants
// //
...@@ -395,6 +395,16 @@ void LLPanelObject::getState( ) ...@@ -395,6 +395,16 @@ void LLPanelObject::getState( )
mCtrlPosY->setEnabled(enable_move); mCtrlPosY->setEnabled(enable_move);
mCtrlPosZ->setEnabled(enable_move); mCtrlPosZ->setEnabled(enable_move);
LLViewerRegion* regionp = objectp->getRegion();
F32 width = regionp != nullptr ? regionp->getWidth() : REGION_WIDTH_METERS;
bool is_attachment = objectp->isAttachment();
mCtrlPosX->setMinValue(is_attachment ? -MAX_ATTACHMENT_DIST : -width);
mCtrlPosX->setMaxValue(is_attachment ? MAX_ATTACHMENT_DIST : width);
mCtrlPosY->setMinValue(is_attachment ? -MAX_ATTACHMENT_DIST : -width);
mCtrlPosY->setMaxValue(is_attachment ? MAX_ATTACHMENT_DIST : width);
mCtrlPosZ->setMinValue(is_attachment ? -MAX_ATTACHMENT_DIST : 0);
mCtrlPosZ->setMaxValue(is_attachment ? MAX_ATTACHMENT_DIST : 4096);
if (enable_scale) if (enable_scale)
{ {
vec = objectp->getScale(); vec = objectp->getScale();
......
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
class LLDrawable; class LLDrawable;
class LLViewerObject; class LLViewerObject;
extern const F32 MAX_ATTACHMENT_DIST;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// class LLViewerJointAttachment // class LLViewerJointAttachment
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment