diff options
| -rw-r--r-- | indra/llui/lltextbase.cpp | 1 | ||||
| -rw-r--r-- | indra/llui/lltextbase.h | 6 | 
2 files changed, 6 insertions, 1 deletions
| diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 677dc63b25..c1b01f420b 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -3458,6 +3458,7 @@ LLNormalTextSegment::LLNormalTextSegment( LLStyleConstSP style, S32 start, S32 e      mLastGeneration(-1)  {      mFontHeight = mStyle->getFont()->getLineHeight(); +    mCanEdit = !mStyle->getDrawHighlightBg();      LLUIImagePtr image = mStyle->getImage();      if (image.notNull()) diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index a2895e6bd6..8eff3c51d9 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -140,7 +140,7 @@ public:      /*virtual*/ S32                 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const;      /*virtual*/ void                updateLayout(const class LLTextBase& editor);      /*virtual*/ F32                 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect); -    /*virtual*/ bool                canEdit() const { return true; } +    /*virtual*/ bool                canEdit() const { return mCanEdit; }      /*virtual*/ const LLUIColor&     getColor() const                    { return mStyle->getColor(); }      /*virtual*/ LLStyleConstSP      getStyle() const                    { return mStyle; }      /*virtual*/ void                setStyle(LLStyleConstSP style)  { mStyle = style; } @@ -163,6 +163,8 @@ protected:      virtual     const LLWString&    getWText()  const;      virtual     const S32           getLength() const; +    void setAllowEdit(bool can_edit) { mCanEdit = can_edit; } +  protected:      class LLTextBase&   mEditor;      LLStyleConstSP      mStyle; @@ -171,6 +173,8 @@ protected:      std::string         mTooltip;      boost::signals2::connection mImageLoadedConnection; +    bool mCanEdit { true }; +      // font rendering      LLFontVertexBuffer  mFontBufferPreSelection;      LLFontVertexBuffer  mFontBufferSelection; | 
