diff options
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
-rw-r--r-- | indra/newview/llpreviewscript.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 7a68d1e270..4c539ded38 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -544,9 +544,6 @@ void LLScriptEdCore::initMenu() menuItem = getChild<LLMenuItemCallGL>("Go to line..."); menuItem->setClickCallback(boost::bind(&LLFloaterGotoLine::show, this)); - menuItem = getChild<LLMenuItemCallGL>("Help..."); - menuItem->setClickCallback(boost::bind(&LLScriptEdCore::onBtnHelp, this)); - menuItem = getChild<LLMenuItemCallGL>("Keyword Help..."); menuItem->setClickCallback(boost::bind(&LLScriptEdCore::onBtnDynamicHelp, this)); @@ -736,7 +733,10 @@ void LLScriptEdCore::updateDynamicHelp(BOOL immediate) } if (immediate || (mLiveHelpTimer.getStarted() && mLiveHelpTimer.getElapsedTimeF32() > LIVE_HELP_REFRESH_TIME)) { - std::string help_string = mEditor->getText().substr(segment->getStart(), segment->getEnd() - segment->getStart()); + // Use Wtext since segment's start/end are made for wstring and will + // result in a shift for case of multi-byte symbols inside std::string. + LLWString segment_text = mEditor->getWText().substr(segment->getStart(), segment->getEnd() - segment->getStart()); + std::string help_string = wstring_to_utf8str(segment_text); setHelpPage(help_string); mLiveHelpTimer.stop(); } @@ -882,11 +882,6 @@ bool LLScriptEdCore::handleSaveChangesDialog(const LLSD& notification, const LLS return false; } -void LLScriptEdCore::onBtnHelp() -{ - LLUI::getInstance()->mHelpImpl->showTopic(HELP_LSL_PORTAL_TOPIC); -} - void LLScriptEdCore::onBtnDynamicHelp() { LLFloater* live_help_floater = mLiveHelpHandle.get(); |