diff options
Diffstat (limited to 'linden/indra/newview/lltexturectrl.cpp')
-rw-r--r-- | linden/indra/newview/lltexturectrl.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/linden/indra/newview/lltexturectrl.cpp b/linden/indra/newview/lltexturectrl.cpp index 6602096..9c64bd3 100644 --- a/linden/indra/newview/lltexturectrl.cpp +++ b/linden/indra/newview/lltexturectrl.cpp | |||
@@ -129,7 +129,7 @@ public: | |||
129 | void setCanApplyImmediately(BOOL b); | 129 | void setCanApplyImmediately(BOOL b); |
130 | 130 | ||
131 | void setDirty( BOOL b ) { mIsDirty = b; } | 131 | void setDirty( BOOL b ) { mIsDirty = b; } |
132 | BOOL isDirty() { return mIsDirty; } | 132 | BOOL isDirty() const { return mIsDirty; } |
133 | void setActive( BOOL active ); | 133 | void setActive( BOOL active ); |
134 | 134 | ||
135 | LLTextureCtrl* getOwner() const { return mOwner; } | 135 | LLTextureCtrl* getOwner() const { return mOwner; } |
@@ -908,7 +908,8 @@ LLTextureCtrl::LLTextureCtrl( | |||
908 | mNonImmediateFilterPermMask( PERM_NONE ), | 908 | mNonImmediateFilterPermMask( PERM_NONE ), |
909 | mCanApplyImmediately( FALSE ), | 909 | mCanApplyImmediately( FALSE ), |
910 | mNeedsRawImageData( FALSE ), | 910 | mNeedsRawImageData( FALSE ), |
911 | mValid( TRUE ) | 911 | mValid( TRUE ), |
912 | mDirty( FALSE ) | ||
912 | { | 913 | { |
913 | mCaption = new LLTextBox( label, | 914 | mCaption = new LLTextBox( label, |
914 | LLRect( 0, BTN_HEIGHT_SMALL, mRect.getWidth(), 0 ), | 915 | LLRect( 0, BTN_HEIGHT_SMALL, mRect.getWidth(), 0 ), |
@@ -1070,6 +1071,18 @@ void LLTextureCtrl::setValid(BOOL valid ) | |||
1070 | } | 1071 | } |
1071 | } | 1072 | } |
1072 | 1073 | ||
1074 | // virtual | ||
1075 | BOOL LLTextureCtrl::isDirty() const | ||
1076 | { | ||
1077 | return mDirty; | ||
1078 | } | ||
1079 | |||
1080 | // virtual | ||
1081 | void LLTextureCtrl::resetDirty() | ||
1082 | { | ||
1083 | mDirty = FALSE; | ||
1084 | } | ||
1085 | |||
1073 | 1086 | ||
1074 | // virtual | 1087 | // virtual |
1075 | void LLTextureCtrl::clear() | 1088 | void LLTextureCtrl::clear() |
@@ -1186,6 +1199,7 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op) | |||
1186 | 1199 | ||
1187 | if( floaterp && mEnabled) | 1200 | if( floaterp && mEnabled) |
1188 | { | 1201 | { |
1202 | mDirty = (op != TEXTURE_CANCEL); | ||
1189 | if( floaterp->isDirty() ) | 1203 | if( floaterp->isDirty() ) |
1190 | { | 1204 | { |
1191 | setTentative( FALSE ); | 1205 | setTentative( FALSE ); |