diff options
| -rw-r--r-- | indra/newview/llfloatercolorpicker.cpp | 18 | 
1 files changed, 13 insertions, 5 deletions
diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp index 1f0e8ee5fa..ba91277c79 100644 --- a/indra/newview/llfloatercolorpicker.cpp +++ b/indra/newview/llfloatercolorpicker.cpp @@ -184,15 +184,23 @@ void LLFloaterColorPicker::showUI ()  		// code that will get switched in for default system color picker  		if ( swatch )  		{ +            // Todo: this needs to be threaded for viewer not to timeout  			LLColor4 curCol = swatch->get ();  			send_agent_pause(); -			getWindow()->dialogColorPicker( &curCol [ 0 ], &curCol [ 1 ], &curCol [ 2 ] ); +			bool commit = getWindow()->dialogColorPicker( &curCol [ 0 ], &curCol [ 1 ], &curCol [ 2 ] );  			send_agent_resume(); -			setOrigRgb ( curCol [ 0 ], curCol [ 1 ], curCol [ 2 ] ); -			setCurRgb( curCol [ 0 ], curCol [ 1 ], curCol [ 2 ] ); - -			LLColorSwatchCtrl::onColorChanged ( swatch, LLColorSwatchCtrl::COLOR_CHANGE ); +            if (commit) +            { +                setOrigRgb(curCol[0], curCol[1], curCol[2]); +                setCurRgb(curCol[0], curCol[1], curCol[2]); + +                LLColorSwatchCtrl::onColorChanged(swatch, LLColorSwatchCtrl::COLOR_SELECT); +            } +            else +            { +                LLColorSwatchCtrl::onColorChanged(swatch, LLColorSwatchCtrl::COLOR_CANCEL); +            }  		}  		closeFloater();  | 
