SL-17570 Slightly better support for system's picker
parent
c2c22b9053
commit
23534c4f1c
|
|
@ -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 ] );
|
||||
if (commit)
|
||||
{
|
||||
setOrigRgb(curCol[0], curCol[1], curCol[2]);
|
||||
setCurRgb(curCol[0], curCol[1], curCol[2]);
|
||||
|
||||
LLColorSwatchCtrl::onColorChanged ( swatch, LLColorSwatchCtrl::COLOR_CHANGE );
|
||||
LLColorSwatchCtrl::onColorChanged(swatch, LLColorSwatchCtrl::COLOR_SELECT);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLColorSwatchCtrl::onColorChanged(swatch, LLColorSwatchCtrl::COLOR_CANCEL);
|
||||
}
|
||||
}
|
||||
|
||||
closeFloater();
|
||||
|
|
|
|||
Loading…
Reference in New Issue