Encapsulate LFIDBearer::sActive, set with member setActive

This function caches the current type when active,
in the future it could be more useful than that.

sActive is now const, getActive returns const,
IDBearers display information, the interface should only be used for that
This commit is contained in:
Liru Færs
2020-01-06 12:22:31 -05:00
parent f73fb6424b
commit 6839cba56a
10 changed files with 31 additions and 20 deletions

View File

@@ -1340,18 +1340,15 @@ void LLFolderView::copy() const
S32 count = mSelectedItems.size();
if(getVisible() && getEnabled() && (count > 0))
{
LLFolderViewEventListener* listener = NULL;
selected_items_t::iterator item_it;
for (item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it)
for (auto item : mSelectedItems)
{
listener = (*item_it)->getListener();
if(listener)
if(auto listener = item->getListener())
{
listener->copyToClipboard();
}
}
}
mSearchString.clear();
//mSearchString.clear(); // Singu Note: There's no good reason to clear out the jumpto item search string now, it'll time out anyway, let's remain const
}
BOOL LLFolderView::canCut() const