From 3c471bb3ed3cf5081d52d9318f860abfcdafd0ae Mon Sep 17 00:00:00 2001 From: Patrick Sapinski Date: Wed, 2 Mar 2011 02:35:40 -0500 Subject: moved the AO inventory preloading to a better place, a place where it actually works. Does anyone even read this? IF YOU SEE THIS TEXT YOU HAVE WON $500, MESSAGE ME TO COLLECT YOUR PRIZE. --- linden/indra/newview/floaterao.cpp | 23 ++++++++++++----------- linden/indra/newview/floaterao.h | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/linden/indra/newview/floaterao.cpp b/linden/indra/newview/floaterao.cpp index d880722..df88d6f 100644 --- a/linden/indra/newview/floaterao.cpp +++ b/linden/indra/newview/floaterao.cpp @@ -119,6 +119,9 @@ AOInvTimer::AOInvTimer() : LLEventTimer( (F32)1.0 ) AOInvTimer::~AOInvTimer() { } + +BOOL AOInvTimer::fullfetch = FALSE; + BOOL AOInvTimer::tick() { if (!(gSavedSettings.getBOOL("AOEnabled"))) return TRUE; @@ -129,6 +132,15 @@ BOOL AOInvTimer::tick() // cmdline_printchat("Inventory fetched, loading AO."); LLFloaterAO::init(); return TRUE; + }else + { + //static BOOL startedfetch = FALSE; + if(fullfetch == FALSE) + { + fullfetch = TRUE; + //no choice, can't move the AO till we find it, should only have to happen once + gInventory.startBackgroundFetch(); + } } } return FALSE; @@ -601,8 +613,6 @@ void LLFloaterAO::updateLayout(LLFloaterAO* floater) } } -BOOL LLFloaterAO::fullfetch = FALSE; - void LLFloaterAO::init() { mAOStands.clear(); @@ -697,15 +707,6 @@ void LLFloaterAO::init() success = TRUE; } } - }else - { - //static BOOL startedfetch = FALSE; - if(fullfetch == FALSE) - { - fullfetch = TRUE; - //no choice, can't move the AO till we find it, should only have to happen once - gInventory.startBackgroundFetch(); - } } } } diff --git a/linden/indra/newview/floaterao.h b/linden/indra/newview/floaterao.h index ed60140..465f32e 100644 --- a/linden/indra/newview/floaterao.h +++ b/linden/indra/newview/floaterao.h @@ -51,6 +51,7 @@ public: class AOInvTimer : public LLEventTimer { public: + static BOOL fullfetch; AOInvTimer(); ~AOInvTimer(); BOOL tick(); @@ -66,7 +67,6 @@ public: static void show(void*); static void init(); - static BOOL fullfetch; static void onClickToggleAO(LLUICtrl *, void*); static void onClickToggleSits(LLUICtrl *, void*); -- cgit v1.1