From 8864a1b4db54b1ae5b335dec6372ee763b05ece9 Mon Sep 17 00:00:00 2001
From: Paul Guslisty <pguslisty@productengine.com>
Date: Fri, 14 Jan 2011 18:10:46 +0200
Subject: [PATCH] STORM-834 FIXED Color picker remains opened after 'Undo
 changes' button was pressed on 'Edit weareble' panel

- Close color picker after color swatch's value updated
---
 indra/newview/llcolorswatch.cpp       | 2 +-
 indra/newview/llcolorswatch.h         | 2 +-
 indra/newview/llpaneleditwearable.cpp | 1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp
index 4a1ba6f1b5f..6f02192d0ae 100644
--- a/indra/newview/llcolorswatch.cpp
+++ b/indra/newview/llcolorswatch.cpp
@@ -319,7 +319,7 @@ void LLColorSwatchCtrl::onColorChanged ( void* data, EColorPickOp pick_op )
 // This is called when the main floatercustomize panel is closed.
 // Since this class has pointers up to its parents, we need to cleanup
 // this class first in order to avoid a crash.
-void LLColorSwatchCtrl::onParentFloaterClosed()
+void LLColorSwatchCtrl::closeFloaterColorPicker()
 {
 	LLFloaterColorPicker* pickerp = (LLFloaterColorPicker*)mPickerHandle.get();
 	if (pickerp)
diff --git a/indra/newview/llcolorswatch.h b/indra/newview/llcolorswatch.h
index cd859ea1286..5bdd1712d20 100644
--- a/indra/newview/llcolorswatch.h
+++ b/indra/newview/llcolorswatch.h
@@ -100,7 +100,7 @@ class LLColorSwatchCtrl
 	/*virtual*/ void	setEnabled( BOOL enabled );
 
 	static void		onColorChanged ( void* data, EColorPickOp pick_op = COLOR_CHANGE );
-	void			onParentFloaterClosed();
+	void			closeFloaterColorPicker();
 
 protected:
 	BOOL			mValid;
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index 90ed8b9e587..4a74b7925c1 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -569,6 +569,7 @@ static void update_color_swatch_ctrl(LLPanelEditWearable* self, LLPanel* panel,
 	if (color_swatch_ctrl)
 	{
 		color_swatch_ctrl->set(self->getWearable()->getClothesColor(entry->mTextureIndex));
+		color_swatch_ctrl->closeFloaterColorPicker();
 	}
 }
 
-- 
GitLab