Updated LLView:

-Removed a few extra unneeded virtuals
 -Pulled tabgroups out of llpanel and into LLView
 -removeChild doesn't support delete. Delete manually.
 -addChildAtEnd renamed to addChildInBack
 -getScreenRect renamed to calcScreenRect
 -added calcScreenBoundingRect and calcBoundingRect(which updateBoundingRect calls
 -General cleanup. Someone at LL figured out that dynamic_cast actually exists.
Fixed PieMenu not reliably centering on cursor.
Fixed context menu crash in line and text editors.
Classes with LLEditMenuHandler as a base do not need to set gEditMenuHandler to NULL, since LLEditMenuHandler's dtor does that already!
This commit is contained in:
Shyotl
2012-02-21 21:59:22 -06:00
parent e2e65c39bf
commit bdeead6f8e
29 changed files with 404 additions and 396 deletions

View File

@@ -372,18 +372,12 @@ LLTextEditor::~LLTextEditor()
{
gFocusMgr.releaseFocusIfNeeded( this ); // calls onCommit()
// Route menu back to the default
if( gEditMenuHandler == this )
{
gEditMenuHandler = NULL;
}
// Scrollbar is deleted by LLView
mHoverSegment = NULL;
std::for_each(mSegments.begin(), mSegments.end(), DeletePointer());
std::for_each(mUndoStack.begin(), mUndoStack.end(), DeletePointer());
LLView::deleteViewByHandle(mPopupMenuHandle);
//LLView::deleteViewByHandle(mPopupMenuHandle);
}
void LLTextEditor::context_cut(void* data)
{
@@ -1461,6 +1455,7 @@ BOOL LLTextEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
mLastContextMenuX = x;
mLastContextMenuY = y;
menu->buildDrawLabels();
menu->updateParent(LLMenuGL::sMenuContainer);
LLMenuGL::showPopup(this, menu, x, y);
}
return TRUE;
@@ -3245,7 +3240,7 @@ void LLTextEditor::drawCursor()
}
// Make sure the IME is in the right place
LLRect screen_pos = getScreenRect();
LLRect screen_pos = calcScreenRect();
LLCoordGL ime_pos( screen_pos.mLeft + llfloor(cursor_left), screen_pos.mBottom + llfloor(cursor_top) );
ime_pos.mX = (S32) (ime_pos.mX * LLUI::sGLScaleFactor.mV[VX]);