diff options
Diffstat (limited to 'indra/newview/lltexturectrl.cpp')
-rw-r--r-- | indra/newview/lltexturectrl.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 4ac08f2a81..e912a72093 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -109,7 +109,7 @@ public: void setCanApplyImmediately(BOOL b); void setDirty( BOOL b ) { mIsDirty = b; } - BOOL isDirty() { return mIsDirty; } + BOOL isDirty() const { return mIsDirty; } void setActive( BOOL active ); LLTextureCtrl* getOwner() const { return mOwner; } @@ -888,7 +888,8 @@ LLTextureCtrl::LLTextureCtrl( mNonImmediateFilterPermMask( PERM_NONE ), mCanApplyImmediately( FALSE ), mNeedsRawImageData( FALSE ), - mValid( TRUE ) + mValid( TRUE ), + mDirty( FALSE ) { mCaption = new LLTextBox( label, LLRect( 0, BTN_HEIGHT_SMALL, mRect.getWidth(), 0 ), @@ -1050,6 +1051,18 @@ void LLTextureCtrl::setValid(BOOL valid ) } } +// virtual +BOOL LLTextureCtrl::isDirty() const +{ + return mDirty; +} + +// virtual +void LLTextureCtrl::resetDirty() +{ + mDirty = FALSE; +} + // virtual void LLTextureCtrl::clear() @@ -1166,6 +1179,7 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op) if( floaterp && mEnabled) { + mDirty = (op != TEXTURE_CANCEL); if( floaterp->isDirty() ) { setTentative( FALSE ); |