summaryrefslogtreecommitdiff
path: root/indra/newview/llmaniptranslate.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-03-11 01:47:36 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-03-11 01:47:36 +0000
commit377ae59c21215473cf05e3cb8a86eb14c9e7715c (patch)
treea8cb48901c3c30bc1c2ddfd5d8b2d0cab7c6c95d /indra/newview/llmaniptranslate.cpp
parent9d12bd5e273b8cb032e25574461a8b4528d96343 (diff)
merge Branch_1-19-1-Viewer -r 80930 : 81609 -> release
DEV-11202: Unhandled Excpetion in pipeline.cpp. Merged over updated windlight ui help text from windlight14. Reverting a const change in a virtual that was not propagated to all overrides. DEV-10957 stop and pause Media and music buttons do not work DEV-10762 Displayed page in the client browser disappears when crossing property boundaries. DEV-11220 replace misspellings in alerts.xml parameters of 'messsage' DEV-11221 fix a misspelling of 'participants' in floater_chat_history.xml tooltip DEV-11193 clean up some viewer strings related to Windlight help text svn merge -r81144:81147 svn+ssh://svn/svn/linden/branches/1-19-1-viewer-threads DEV-11110 Media browser history dropdown does not save items across sessions Ran the xuiparse -process tool on all en-us xml files. This does NOT change any data, merely reorders attributes and cleans up tab/spacing. DEV-11349 XML CLEANUP: fix duplicate sibling names in en-us xui files DEV-11348 Change to llmimetypes.cpp broke Media Type dropdown dev-10623 "parcels that played movies no longer work in combo-merge-ui" DEV-11379 - crash in LLTabContainer::draw() DEV-11377 Elminiate dangerous LLLinkedList and LLDoubleLinkedList from newview DEV-11158 sculpties on the top10 crash list DEV-11404 "Send Current URL to Parcel" does not set the MIME type merge 80958:80959 maint-ui-9-qa, DEV-11105 -- Searching for people with 3 characters like "j l" hurts the database. DEV-10489: no draw distance cheating DEV-879: water noise frequency DEV-10764: macbook air support DEV-10878: Linux Intel945 support DEV-7551: featuretable adjustments for framerate. DEV-11426 Enormous mini-map. DEV-11505 - Crash in gunzip_file. Removed final LinkedList, SkipMap, and AssocList templates from the Viewer! DEV-11115 truncated word in the Advanced Water Editor's modal help dialog
Diffstat (limited to 'indra/newview/llmaniptranslate.cpp')
-rw-r--r--indra/newview/llmaniptranslate.cpp30
1 files changed, 13 insertions, 17 deletions
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index 3182f14951..98d67f3804 100644
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -100,11 +100,6 @@ const U32 ARROW_TO_AXIS[4] =
VZ
};
-BOOL sort_manip_by_end_z(LLManipTranslate::ManipulatorHandle *new_manip, LLManipTranslate::ManipulatorHandle *test_manip)
-{
- return (new_manip->mEndPosition.mV[VZ] < test_manip->mEndPosition.mV[VZ]);
-}
-
LLManipTranslate::LLManipTranslate( LLToolComposite* composite )
: LLManip( "Move", composite ),
mLastHoverMouseX(-1),
@@ -125,8 +120,6 @@ LLManipTranslate::LLManipTranslate( LLToolComposite* composite )
mPlaneScales(1.f, 1.f, 1.f),
mPlaneManipPositions(1.f, 1.f, 1.f, 1.f)
{
- mProjectedManipulators.setInsertBefore(sort_manip_by_end_z);
-
if (sGridTex == 0)
{
restoreGL();
@@ -253,7 +246,7 @@ void LLManipTranslate::restoreGL()
LLManipTranslate::~LLManipTranslate()
{
- mProjectedManipulators.deleteAllData();
+ for_each(mProjectedManipulators.begin(), mProjectedManipulators.end(), DeletePointer());
}
@@ -841,8 +834,6 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y)
transform *= projMatrix;
}
- mProjectedManipulators.deleteAllData();
-
S32 numManips = 0;
// edges
@@ -898,6 +889,9 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y)
planar_manip_xy_visible = TRUE;
}
+ for_each(mProjectedManipulators.begin(), mProjectedManipulators.end(), DeletePointer());
+ mProjectedManipulators.clear();
+
for (S32 i = 0; i < num_arrow_manips; i+= 2)
{
LLVector4 projected_start = mManipulatorVertices[i] * transform;
@@ -911,7 +905,7 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y)
LLVector3(projected_end.mV[VX], projected_end.mV[VY], projected_end.mV[VZ]),
MANIPULATOR_IDS[i / 2],
10.f); // 10 pixel hotspot for arrows
- mProjectedManipulators.addDataSorted(projManipulator);
+ mProjectedManipulators.insert(projManipulator);
}
if (planar_manip_yz_visible)
@@ -928,7 +922,7 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y)
LLVector3(projected_end.mV[VX], projected_end.mV[VY], projected_end.mV[VZ]),
MANIPULATOR_IDS[i / 2],
20.f); // 20 pixels for planar manipulators
- mProjectedManipulators.addDataSorted(projManipulator);
+ mProjectedManipulators.insert(projManipulator);
}
if (planar_manip_xz_visible)
@@ -945,7 +939,7 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y)
LLVector3(projected_end.mV[VX], projected_end.mV[VY], projected_end.mV[VZ]),
MANIPULATOR_IDS[i / 2],
20.f); // 20 pixels for planar manipulators
- mProjectedManipulators.addDataSorted(projManipulator);
+ mProjectedManipulators.insert(projManipulator);
}
if (planar_manip_xy_visible)
@@ -962,7 +956,7 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y)
LLVector3(projected_end.mV[VX], projected_end.mV[VY], projected_end.mV[VZ]),
MANIPULATOR_IDS[i / 2],
20.f); // 20 pixels for planar manipulators
- mProjectedManipulators.addDataSorted(projManipulator);
+ mProjectedManipulators.insert(projManipulator);
}
LLVector2 manip_start_2d;
@@ -973,9 +967,10 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y)
LLVector2 mousePos((F32)x - half_width, (F32)y - half_height);
LLVector2 mouse_delta;
- for (ManipulatorHandle* manipulator = mProjectedManipulators.getFirstData();
- manipulator;
- manipulator = mProjectedManipulators.getNextData())
+ for (minpulator_list_t::iterator iter = mProjectedManipulators.begin();
+ iter != mProjectedManipulators.end(); ++iter)
+ {
+ ManipulatorHandle* manipulator = *iter;
{
manip_start_2d.setVec(manipulator->mStartPosition.mV[VX] * half_width, manipulator->mStartPosition.mV[VY] * half_height);
manip_end_2d.setVec(manipulator->mEndPosition.mV[VX] * half_width, manipulator->mEndPosition.mV[VY] * half_height);
@@ -996,6 +991,7 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y)
break;
}
}
+ }
}
F32 LLManipTranslate::getMinGridScale()