summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llselectmgr.cpp5
-rw-r--r--indra/newview/llselectmgr.h1
-rw-r--r--indra/newview/llviewermenu.cpp18
3 files changed, 19 insertions, 5 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index e07c11b1e3..dd934ce6b8 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -6006,6 +6006,11 @@ S32 LLSelectNode::getLastSelectedTE()
return mLastTESelected;
}
+S32 LLSelectNode::getLastOperatedTE()
+{
+ return mLastTESelected;
+}
+
LLViewerObject* LLSelectNode::getObject()
{
if (!mObject)
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index c167ecd236..2a893af266 100644
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -170,6 +170,7 @@ public:
void selectTE(S32 te_index, BOOL selected);
BOOL isTESelected(S32 te_index);
S32 getLastSelectedTE();
+ S32 getLastOperatedTE();
S32 getTESelectMask() { return mTESelectMask; }
void renderOneWireframe(const LLColor4& color);
void renderOneSilhouette(const LLColor4 &color);
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;