Merged in lindenlab/viewer-lynx

meow-7.2.2
AndreyL ProductEngine 2017-07-28 21:31:59 +03:00
commit b8fe2d91c7
4 changed files with 17 additions and 6 deletions

View File

@ -1586,7 +1586,12 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod)
LLMeshRepository::sCacheBytesRead += size;
++LLMeshRepository::sCacheReads;
file.seek(offset);
U8* buffer = new U8[size];
U8* buffer = new(std::nothrow) U8[size];
if (!buffer)
{
LL_WARNS(LOG_MESH) << "Can't allocate memory for mesh LOD" << LL_ENDL;
return false;
}
file.read(buffer, size);
//make sure buffer isn't all 0's by checking the first 1KB (reserved block but not written)

View File

@ -1683,6 +1683,7 @@ void LLPreviewLSL::saveIfNeeded(bool sync /*= true*/)
mScriptEd->sync();
}
if (!gAgent.getRegion()) return;
const LLInventoryItem *inv_item = getItem();
// save it out to asset server
std::string url = gAgent.getRegion()->getCapability("UpdateScriptAgent");

View File

@ -46,6 +46,8 @@
#include "lltransientfloatermgr.h"
#include "llviewercontrol.h" // for gSavedSettings
#include <boost/algorithm/string.hpp>
const S32 MAX_ALLOWED_MSG_WIDTH = 400;
const F32 DEFAULT_BUTTON_DELAY = 0.5f;
@ -389,15 +391,18 @@ bool LLToastAlertPanel::setCheckBox( const std::string& check_title, const std::
const LLFontGL* font = mCheck->getFont();
const S32 LINE_HEIGHT = font->getLineHeight();
std::vector<std::string> lines;
boost::split(lines, check_title, boost::is_any_of("\n"));
// Extend dialog for "check next time"
S32 max_msg_width = LLToastPanel::getRect().getWidth() - 2 * HPAD;
S32 check_width = S32(font->getWidth(check_title) + 0.99f) + 16;
S32 check_width = S32(font->getWidth(lines[0]) + 0.99f) + 16; // use width of the first line
max_msg_width = llmax(max_msg_width, check_width);
S32 dialog_width = max_msg_width + 2 * HPAD;
S32 dialog_height = LLToastPanel::getRect().getHeight();
dialog_height += LINE_HEIGHT;
dialog_height += LINE_HEIGHT * lines.size();
dialog_height += LINE_HEIGHT / 2;
LLToastPanel::reshape( dialog_width, dialog_height, FALSE );
@ -406,7 +411,7 @@ bool LLToastAlertPanel::setCheckBox( const std::string& check_title, const std::
// set check_box's attributes
LLRect check_rect;
mCheck->setRect(check_rect.setOriginAndSize(msg_x, VPAD+BTN_HEIGHT+LINE_HEIGHT/2, max_msg_width, LINE_HEIGHT));
mCheck->setRect(check_rect.setOriginAndSize(msg_x, VPAD+BTN_HEIGHT+LINE_HEIGHT/2, max_msg_width, LINE_HEIGHT*lines.size()));
mCheck->setLabel(check_title);
mCheck->setCommitCallback(boost::bind(&LLToastAlertPanel::onClickIgnore, this, _1));

View File

@ -5,8 +5,8 @@
</global>
<global name="skipnexttimesessiononly">
Don&apos;t show me this again (for this session only)
Don&apos;t show me this again
(for current session)
</global>
<global name="alwayschoose">