diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 664668f2f7cf686fb69e6c4c63aa22ba6fc5562d..ff7594a531b921580c7c77d2f2fc6a80e94e7b0e 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -1235,14 +1235,14 @@ S32 LLFloaterSnapshot::notify(const LLSD& info) return 0; } -void LLFloaterSnapshotBase::ImplBase::updateLivePreview() +BOOL LLFloaterSnapshotBase::ImplBase::updatePreviewList(bool initialized) { LLFloaterFacebook* floater_facebook = LLFloaterReg::findTypedInstance<LLFloaterFacebook>("facebook"); LLFloaterFlickr* floater_flickr = LLFloaterReg::findTypedInstance<LLFloaterFlickr>("flickr"); LLFloaterTwitter* floater_twitter = LLFloaterReg::findTypedInstance<LLFloaterTwitter>("twitter"); - if (!mFloater && !floater_facebook && !floater_flickr && !floater_twitter) - return; + if (!initialized && !floater_facebook && !floater_flickr && !floater_twitter) + return FALSE; BOOL changed = FALSE; LL_DEBUGS() << "npreviews: " << LLSnapshotLivePreview::sList.size() << LL_ENDL; @@ -1251,8 +1251,13 @@ void LLFloaterSnapshotBase::ImplBase::updateLivePreview() { changed |= LLSnapshotLivePreview::onIdle(*iter); } + return changed; +} + - if (mFloater && changed) +void LLFloaterSnapshotBase::ImplBase::updateLivePreview() +{ + if (ImplBase::updatePreviewList(true) && mFloater) { LL_DEBUGS() << "changed" << LL_ENDL; updateControls(mFloater); @@ -1267,6 +1272,10 @@ void LLFloaterSnapshot::update() { inst->impl->updateLivePreview(); } + else + { + ImplBase::updatePreviewList(false); + } } // static diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h index 4bcfa674fa140dd92298f7dc0b29afbe43aa04ce..1f303ea4d6532d34193e8afaf7fce11ca7563628 100644 --- a/indra/newview/llfloatersnapshot.h +++ b/indra/newview/llfloatersnapshot.h @@ -116,6 +116,8 @@ class LLFloaterSnapshotBase::ImplBase virtual EStatus getStatus() const { return mStatus; } virtual void setNeedRefresh(bool need); + static BOOL updatePreviewList(bool initialized); + void setAdvanced(bool advanced) { mAdvanced = advanced; } virtual LLSnapshotModel::ESnapshotLayerType getLayerType(LLFloaterSnapshotBase* floater) = 0;