diff options
Diffstat (limited to 'linden/indra/newview/lltexturectrl.cpp')
-rw-r--r-- | linden/indra/newview/lltexturectrl.cpp | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/linden/indra/newview/lltexturectrl.cpp b/linden/indra/newview/lltexturectrl.cpp index 1436b62..b5c1ace 100644 --- a/linden/indra/newview/lltexturectrl.cpp +++ b/linden/indra/newview/lltexturectrl.cpp | |||
@@ -410,32 +410,35 @@ BOOL LLFloaterTexturePicker::handleKeyHere(KEY key, MASK mask, BOOL called_from_ | |||
410 | { | 410 | { |
411 | LLFolderView* root_folder = mInventoryPanel->getRootFolder(); | 411 | LLFolderView* root_folder = mInventoryPanel->getRootFolder(); |
412 | 412 | ||
413 | if (!called_from_parent && root_folder && | 413 | if (root_folder && mSearchEdit) |
414 | mSearchEdit && mSearchEdit->hasFocus() && | ||
415 | (key == KEY_RETURN || key == KEY_DOWN) && mask == MASK_NONE) | ||
416 | { | 414 | { |
417 | if (!root_folder->getCurSelectedItem()) | 415 | if (!called_from_parent && mSearchEdit->hasFocus() && |
416 | (key == KEY_RETURN || key == KEY_DOWN) && | ||
417 | mask == MASK_NONE) | ||
418 | { | 418 | { |
419 | LLFolderViewItem* itemp = root_folder->getItemByID(gAgent.getInventoryRootID()); | 419 | if (!root_folder->getCurSelectedItem()) |
420 | if (itemp) | ||
421 | { | 420 | { |
422 | root_folder->setSelection(itemp, FALSE, FALSE); | 421 | LLFolderViewItem* itemp = root_folder->getItemByID(gAgent.getInventoryRootID()); |
422 | if (itemp) | ||
423 | { | ||
424 | root_folder->setSelection(itemp, FALSE, FALSE); | ||
425 | } | ||
423 | } | 426 | } |
427 | root_folder->scrollToShowSelection(); | ||
428 | |||
429 | // move focus to inventory proper | ||
430 | root_folder->setFocus(TRUE); | ||
431 | |||
432 | // treat this as a user selection of the first filtered result | ||
433 | commitIfImmediateSet(); | ||
434 | |||
435 | return TRUE; | ||
424 | } | 436 | } |
425 | root_folder->scrollToShowSelection(); | ||
426 | |||
427 | // move focus to inventory proper | ||
428 | root_folder->setFocus(TRUE); | ||
429 | 437 | ||
430 | // treat this as a user selection of the first filtered result | 438 | if (root_folder->hasFocus() && key == KEY_UP) |
431 | commitIfImmediateSet(); | 439 | { |
432 | 440 | mSearchEdit->focusFirstItem(TRUE); | |
433 | return TRUE; | 441 | } |
434 | } | ||
435 | |||
436 | if (root_folder->hasFocus() && key == KEY_UP) | ||
437 | { | ||
438 | mSearchEdit->focusFirstItem(TRUE); | ||
439 | } | 442 | } |
440 | 443 | ||
441 | return LLFloater::handleKeyHere(key, mask, called_from_parent); | 444 | return LLFloater::handleKeyHere(key, mask, called_from_parent); |