From 6bbbd6582fdf5bb24cf69f2106662032b2f77b8a Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Thu, 17 Jun 2010 11:10:28 -0400
Subject: [PATCH] EXT-7888 FIXED Opening a gesture from an in-world object
 shows gesture floater with blank information EXT-7909 FIXED Cleanup
 llpreviewgesture #include files

Fixed an issue that was causing gesture asset loading to fail.
Also did header file cleanup.
---
 indra/newview/llpreviewgesture.cpp | 52 +++++++++---------------------
 indra/newview/llpreviewgesture.h   |  2 --
 2 files changed, 15 insertions(+), 39 deletions(-)

diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index 2e061b235dc..ff315d3c53c 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -31,55 +31,31 @@
  */
 
 #include "llviewerprecompiledheaders.h"
-
 #include "llpreviewgesture.h"
 
-#include <algorithm>
-
-// libraries
-#include "lldatapacker.h"
-#include "lldarray.h"
-#include "llstring.h"
-#include "lldir.h"
+#include "llagent.h"
+#include "llanimstatelabels.h"
+#include "llanimationstates.h"
+#include "llappviewer.h"			// gVFS
+#include "llassetuploadresponders.h"
+#include "llcheckboxctrl.h"
+#include "llcombobox.h"
+#include "lldelayedgestureerror.h"
 #include "llfloaterreg.h"
+#include "llgesturemgr.h"
 #include "llinventorydefines.h"
 #include "llinventoryfunctions.h"
 #include "llinventorymodel.h"
 #include "llinventorymodelbackgroundfetch.h"
 #include "llmultigesture.h"
 #include "llnotificationsutil.h"
-#include "llvfile.h"
-
-// newview
-#include "llagent.h"		// todo: remove
-#include "llanimationstates.h"
-#include "llassetuploadresponders.h"
-#include "llbutton.h"
-#include "llcheckboxctrl.h"
-#include "llcombobox.h"
-#include "lldelayedgestureerror.h"
-#include "llfloatergesture.h" // for some label constants
-#include "llgesturemgr.h"
-#include "llkeyboard.h"
-#include "lllineeditor.h"
 #include "llradiogroup.h"
-#include "llscrolllistctrl.h"
-#include "llscrolllistitem.h"
-#include "llscrolllistcell.h"
-#include "lltextbox.h"
-#include "lluictrlfactory.h"
-#include "llviewerinventory.h"
-#include "llviewerobject.h"
+#include "llresmgr.h"
+#include "lltrans.h"
+#include "llvfile.h"
 #include "llviewerobjectlist.h"
 #include "llviewerregion.h"
 #include "llviewerstats.h"
-#include "llviewerwindow.h"		// busycount
-#include "llvoavatarself.h"
-#include "llappviewer.h"			// gVFS
-#include "llanimstatelabels.h"
-#include "llresmgr.h"
-#include "lltrans.h"
-
 
 std::string NONE_LABEL;
 std::string SHIFT_LABEL;
@@ -832,7 +808,9 @@ void LLPreviewGesture::loadAsset()
 	const LLInventoryItem* item = getItem();
 	if (!item) 
 	{
-		mAssetStatus = PREVIEW_ASSET_ERROR;
+		// Don't set asset status here; we may not have set the item id yet
+		// (e.g. when this gets called initially)
+		//mAssetStatus = PREVIEW_ASSET_ERROR;
 		return;
 	}
 
diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h
index 5968e936ef8..b75d18873fa 100644
--- a/indra/newview/llpreviewgesture.h
+++ b/indra/newview/llpreviewgesture.h
@@ -34,7 +34,6 @@
 #define LL_LLPREVIEWGESTURE_H
 
 #include "llassettype.h"
-#include "llmultigesture.h"
 #include "llpreview.h"
 
 class LLMultiGesture;
@@ -45,7 +44,6 @@ class LLComboBox;
 class LLScrollListCtrl;
 class LLScrollListItem;
 class LLButton;
-class LLGestureStep;
 class LLRadioGroup;
 class LLVFS;
 
-- 
GitLab