diff options
author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2009-12-09 11:16:43 -0500 |
---|---|---|
committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2009-12-09 11:16:43 -0500 |
commit | e6f1604549f90ad92a5556a84d3c609f3b683069 (patch) | |
tree | 5340d873c7d57a3dcdb7834261bea98324087f95 /indra/newview | |
parent | cb88b7f4a41f66249129eaa9b173ec8c206a3958 (diff) | |
parent | d75e1472c43357114b677ff66c1faffea0b73d27 (diff) |
Automated merge with ssh://hg.lindenlab.com/tulla/avatar-pipeline-2-0/
--HG--
branch : avatar-pipeline
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llcolorswatch.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llcolorswatch.h | 1 | ||||
-rw-r--r-- | indra/newview/llfloatercolorpicker.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llfloatercolorpicker.h | 2 |
4 files changed, 26 insertions, 1 deletions
diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp index 442e9ab27b..b2399d238b 100644 --- a/indra/newview/llcolorswatch.cpp +++ b/indra/newview/llcolorswatch.cpp @@ -306,6 +306,18 @@ void LLColorSwatchCtrl::onColorChanged ( void* data, EColorPickOp pick_op ) } } +void LLColorSwatchCtrl::onFloaterClose() +{ + LLFloaterColorPicker* pickerp = (LLFloaterColorPicker*)mPickerHandle.get(); + + if (pickerp) + { + pickerp->setSwatch(NULL); + } + + mPickerHandle.markDead(); +} + void LLColorSwatchCtrl::setValid(BOOL valid ) { mValid = valid; @@ -323,7 +335,7 @@ void LLColorSwatchCtrl::showPicker(BOOL take_focus) if (!pickerp) { pickerp = new LLFloaterColorPicker(this, mCanApplyImmediately); - gFloaterView->getParentFloater(this)->addDependentFloater(pickerp); + //gFloaterView->getParentFloater(this)->addDependentFloater(pickerp); mPickerHandle = pickerp->getHandle(); } diff --git a/indra/newview/llcolorswatch.h b/indra/newview/llcolorswatch.h index e3e267f831..2f6aec85e8 100644 --- a/indra/newview/llcolorswatch.h +++ b/indra/newview/llcolorswatch.h @@ -105,6 +105,7 @@ public: /*virtual*/ void setEnabled( BOOL enabled ); static void onColorChanged ( void* data, EColorPickOp pick_op = COLOR_CHANGE ); + void onFloaterClose(); protected: BOOL mValid; diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp index 73b79d8e13..56b56dc3d2 100644 --- a/indra/newview/llfloatercolorpicker.cpp +++ b/indra/newview/llfloatercolorpicker.cpp @@ -241,6 +241,16 @@ BOOL LLFloaterColorPicker::postBuild() return TRUE; } +/*virtual*/ +void LLFloaterColorPicker::onClose(bool app_settings) +{ + if (mSwatch) + { + mSwatch->onFloaterClose(); + } + stopUsingPipette(); +} + ////////////////////////////////////////////////////////////////////////////// // void LLFloaterColorPicker::initUI ( F32 rValIn, F32 gValIn, F32 bValIn ) diff --git a/indra/newview/llfloatercolorpicker.h b/indra/newview/llfloatercolorpicker.h index a16cde7f10..b381740acd 100644 --- a/indra/newview/llfloatercolorpicker.h +++ b/indra/newview/llfloatercolorpicker.h @@ -56,6 +56,7 @@ class LLFloaterColorPicker // overrides virtual BOOL postBuild (); + virtual void onClose(bool app_settings); virtual void draw (); virtual BOOL handleMouseDown ( S32 x, S32 y, MASK mask ); virtual BOOL handleMouseUp ( S32 x, S32 y, MASK mask ); @@ -69,6 +70,7 @@ class LLFloaterColorPicker void destroyUI (); void cancelSelection (); LLColorSwatchCtrl* getSwatch () { return mSwatch; }; + void setSwatch( LLColorSwatchCtrl* swatch) { mSwatch = swatch; } // mutator / accessor for original RGB value void setOrigRgb ( F32 origRIn, F32 origGIn, F32 origBIn ); |