STORM-255 : Merge from viewer-development
commit
a4bb2b8bdd
|
|
@ -596,6 +596,8 @@ Salahzar Stenvaag
|
|||
CT-321
|
||||
Sammy Frederix
|
||||
VWR-6186
|
||||
Satomi Ahn
|
||||
STORM-501
|
||||
Scrippy Scofield
|
||||
VWR-3748
|
||||
Seg Baphomet
|
||||
|
|
|
|||
|
|
@ -2214,19 +2214,39 @@ bool LLTextBase::scrolledToEnd()
|
|||
return mScroller->isAtBottom();
|
||||
}
|
||||
|
||||
|
||||
bool LLTextBase::setCursor(S32 row, S32 column)
|
||||
{
|
||||
if (0 <= row && row < (S32)mLineInfoList.size())
|
||||
{
|
||||
S32 doc_pos = mLineInfoList[row].mDocIndexStart;
|
||||
column = llclamp(column, 0, mLineInfoList[row].mDocIndexEnd - mLineInfoList[row].mDocIndexStart - 1);
|
||||
doc_pos += column;
|
||||
updateCursorXPos();
|
||||
if (row < 0 || column < 0) return false;
|
||||
|
||||
S32 n_lines = mLineInfoList.size();
|
||||
for (S32 line = row; line < n_lines; ++line)
|
||||
{
|
||||
const line_info& li = mLineInfoList[line];
|
||||
|
||||
if (li.mLineNum < row)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else if (li.mLineNum > row)
|
||||
{
|
||||
break; // invalid column specified
|
||||
}
|
||||
|
||||
// Found the given row.
|
||||
S32 line_length = li.mDocIndexEnd - li.mDocIndexStart;;
|
||||
if (column >= line_length)
|
||||
{
|
||||
column -= line_length;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Found the given column.
|
||||
updateCursorXPos();
|
||||
S32 doc_pos = li.mDocIndexStart + column;
|
||||
return setCursorPos(doc_pos);
|
||||
}
|
||||
return false;
|
||||
|
||||
return false; // invalid row or column specified
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -290,7 +290,10 @@ void LLInventoryPanel::modelChanged(U32 mask)
|
|||
const LLUUID& item_id = (*items_iter);
|
||||
const LLInventoryObject* model_item = model->getObject(item_id);
|
||||
LLFolderViewItem* view_item = mFolderRoot->getItemByID(item_id);
|
||||
LLFolderViewFolder* view_folder = mFolderRoot->getFolderByID(item_id);
|
||||
|
||||
// LLFolderViewFolder is derived from LLFolderViewItem so dynamic_cast from item
|
||||
// to folder is the fast way to get a folder without searching through folders tree.
|
||||
LLFolderViewFolder* view_folder = dynamic_cast<LLFolderViewFolder*>(view_item);
|
||||
|
||||
//////////////////////////////
|
||||
// LABEL Operation
|
||||
|
|
|
|||
Loading…
Reference in New Issue