diff options
author | andreykproductengine <none@none> | 2016-11-30 21:25:06 +0200 |
---|---|---|
committer | andreykproductengine <none@none> | 2016-11-30 21:25:06 +0200 |
commit | 00bb6a5ecd09b5ae0a209ad68fe1998b70b66e04 (patch) | |
tree | 5bf7244c3072ace052529fb86f680cc06da1a070 /indra/newview/llviewermenu.cpp | |
parent | caa0e333ed0cec59e6e1c6e570051584335bfca3 (diff) |
MAINT-6803 Account for deselection
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 24df985e3a..f904cc6eb8 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5227,11 +5227,15 @@ class LLToolsSelectNextPartFace : public view_listener_t if (!to_select) return false; S32 te_count = to_select->getNumTEs(); - S32 selected_te = nodep->getLastSelectedTE(); + S32 selected_te = nodep->getLastOperatedTE(); - if ((fwd || ifwd) && selected_te >= 0) + if (fwd || ifwd) { - if (selected_te + 1 < te_count) + if (selected_te < 0) + { + new_te = 0; + } + else if (selected_te + 1 < te_count) { // select next face new_te = selected_te + 1; @@ -5242,9 +5246,13 @@ class LLToolsSelectNextPartFace : public view_listener_t restart_face_on_part = true; } } - else if ((prev || iprev) && selected_te < te_count) + else if (prev || iprev) { - if (selected_te - 1 >= 0) + if (selected_te > te_count) + { + new_te = te_count - 1; + } + else if (selected_te - 1 >= 0) { // select previous face new_te = selected_te - 1; |