Hack to resolve SV-2036. A lot of this code will probably get wiped out in a merge soonish, so not investing time into a more proper fix.

This commit is contained in:
Shyotl
2016-06-21 01:54:21 -05:00
parent 95f56f040a
commit cd25894a39
2 changed files with 9 additions and 0 deletions

View File

@@ -248,6 +248,7 @@ public:
void setNeedsAutoRename(BOOL val) { mNeedsAutoRename = val; }
void setPinningSelectedItem(BOOL val) { mPinningSelectedItem = val; }
void setAutoSelectOverride(BOOL val) { mAutoSelectOverride = val; }
bool getAutoSelectOverride() const { return mAutoSelectOverride; }
BOOL getDebugFilters() { return mDebugFilters; }

View File

@@ -173,7 +173,15 @@ void do_create(LLInventoryModel *model, LLInventoryPanel *ptr, const LLSD& sdtyp
LLFolderType::FT_NONE, LLStringUtil::null);
}
model->notifyObservers();
// Singu Note: SV-2036
// Hack! setSelection sets category to fetching state, which disables scrolling. Scrolling, however, is desired.
// Setting autoSelectOverride to true just happens to skip the fetch check, thus allowing the scroll to proceed.
bool autoselected = ptr->getRootFolder()->getAutoSelectOverride();
ptr->getRootFolder()->setAutoSelectOverride(true);
ptr->setSelection(category, TRUE);
// Restore autoSelectOverride to whatever it was before we hijacked it.
ptr->getRootFolder()->setAutoSelectOverride(autoselected);
}
else if ("lsl" == type)
{