Skip to content
Snippets Groups Projects
Commit f9cf5974 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Fix chat alert color editor

parent 25ba07af
No related branches found
No related tags found
2 merge requests!3Update to main branch,!2Rebase onto current main branch
......@@ -128,10 +128,25 @@ BOOL LLColorSwatchCtrl::handleUnicodeCharHere(llwchar uni_char)
return LLUICtrl::handleUnicodeCharHere(uni_char);
}
// [SL:KB] - Patch: Control-ColorSwatchCtrl | Checked: 2012-08-28 (Catznip-3.3)
BOOL LLColorSwatchCtrl::isDirty() const
{
return (mColor != mPrevColor);
}
void LLColorSwatchCtrl::resetDirty()
{
mPrevColor = mColor;
}
// [/SL:KB]
// forces color of this swatch and any associated floater to the input value, if currently invalid
void LLColorSwatchCtrl::setOriginal(const LLColor4& color)
{
mColor = color;
// [SL:KB] - Patch: Control-ColorSwatchCtrl | Checked: 2012-08-28 (Catznip-3.3)
mPrevColor = mColor;
// [/SL:KB]
LLFloaterColorPicker* pickerp = (LLFloaterColorPicker*)mPickerHandle.get();
if (pickerp)
{
......@@ -142,6 +157,9 @@ void LLColorSwatchCtrl::setOriginal(const LLColor4& color)
void LLColorSwatchCtrl::set(const LLColor4& color, BOOL update_picker, BOOL from_event)
{
mColor = color;
// [SL:KB] - Patch: Control-ColorSwatchCtrl | Checked: 2012-08-28 (Catznip-3.3)
mPrevColor = mColor;
// [/SL:KB]
LLFloaterColorPicker* pickerp = (LLFloaterColorPicker*)mPickerHandle.get();
if (pickerp && update_picker)
{
......
......@@ -75,6 +75,10 @@ class LLColorSwatchCtrl final
/*virtual*/ LLSD getValue() const { return mColor.getValue(); }
const LLColor4& get() { return mColor; }
// [SL:KB] - Patch: Control-ColorSwatchCtrl | Checked: 2012-08-28 (Catznip-3.3)
/*virtual*/ BOOL isDirty() const; // Returns TRUE if user changed value at all
/*virtual*/ void resetDirty(); // Clear dirty state
// [/SL:KB]
void set(const LLColor4& color, BOOL update_picker = FALSE, BOOL from_event = FALSE);
void setOriginal(const LLColor4& color);
......@@ -103,6 +107,9 @@ class LLColorSwatchCtrl final
protected:
bool mValid;
LLColor4 mColor;
// [SL:KB] - Patch: Control-ColorSwatchCtrl | Checked: 2012-08-28 (Catznip-3.3)
LLColor4 mPrevColor;
// [/SL:KB]
LLUIColor mBorderColor;
LLTextBox* mCaption;
LLHandle<LLFloater> mPickerHandle;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment