Miscellaneous touchups

Fixes chatbar not handling ctrl+shift+arrow for word selection
lltoolmgr.cpp sync
Removes some pointless dead code from llviewertexteditor.cpp
This commit is contained in:
Inusaito Sayori
2013-10-21 15:15:17 -04:00
parent a33efc61a2
commit d95e1800e1
3 changed files with 20 additions and 28 deletions

View File

@@ -141,8 +141,6 @@ void LLToolMgr::initTools()
gBasicToolset->addTool( LLToolCompInspect::getInstance() );
gFaceEditToolset->addTool( LLToolCamera::getInstance() );
// In case focus was lost before we got here
clearSavedTool();
// On startup, use "select" tool
setCurrentToolset(gBasicToolset);
@@ -283,24 +281,7 @@ bool LLToolMgr::canEdit()
void LLToolMgr::toggleBuildMode()
{
if (inBuildMode())
{
if (gSavedSettings.getBOOL("EditCameraMovement"))
{
// just reset the view, will pull us out of edit mode
handle_reset_view();
}
else
{
// manually disable edit mode, but do not affect the camera
gAgentCamera.resetView(false);
gFloaterTools->close();
gViewerWindow->showCursor();
}
// avoid spurious avatar movements pulling out of edit mode
LLViewerJoystick::getInstance()->setNeedsReset();
}
else
if (!inBuildMode())
{
ECameraMode camMode = gAgentCamera.getCameraMode();
if (CAMERA_MODE_MOUSELOOK == camMode || CAMERA_MODE_CUSTOMIZE_AVATAR == camMode)
@@ -350,6 +331,24 @@ void LLToolMgr::toggleBuildMode()
LLViewerJoystick::getInstance()->setNeedsReset();
}
else
{
if (gSavedSettings.getBOOL("EditCameraMovement"))
{
// just reset the view, will pull us out of edit mode
handle_reset_view();
}
else
{
// manually disable edit mode, but do not affect the camera
gAgentCamera.resetView(false);
gFloaterTools->close();
gViewerWindow->showCursor();
}
// avoid spurious avatar movements pulling out of edit mode
LLViewerJoystick::getInstance()->setNeedsReset();
}
}
bool LLToolMgr::inBuildMode()

View File

@@ -1644,15 +1644,8 @@ LLView* LLViewerTextEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlF
LLFontGL* font = LLView::selectFont(node);
// std::string text = node->getValue();
std::string text = node->getTextContents().substr(0, max_text_length - 1);
if (text.size() > max_text_length)
{
// Erase everything from max_text_length on.
text.erase(max_text_length);
}
LLViewerTextEditor* text_editor = new LLViewerTextEditor("text_editor",
rect,
max_text_length,

View File

@@ -2809,7 +2809,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
case KEY_RIGHT:
case KEY_UP:
case KEY_DOWN:
if (mask == MASK_CONTROL)
if (mask & MASK_CONTROL)
break;
case KEY_PAGE_UP:
case KEY_PAGE_DOWN: