Merge viewer-bear
commit
e7ade840e4
1
.hgtags
1
.hgtags
|
|
@ -544,3 +544,4 @@ d07f76c5b9860fb87924d00ca729f7d4532534d6 3.7.29-release
|
|||
e821ef17c6edea4a59997719d8ba416d8c16e143 3.8.5-release
|
||||
5a5bd148943bfb46cf2ff2ccf376c42dee93d19b 3.8.6-release
|
||||
ae3297cdd03ab14f19f3811acbc4acd3eb600336 4.0.0-release
|
||||
759710a9acef61aaf7b69f4bc4a5a913de87ad8a 4.0.1-release
|
||||
|
|
|
|||
|
|
@ -989,6 +989,7 @@ NickyD
|
|||
MAINT-873
|
||||
Nicky Dasmijn
|
||||
VWR-29228
|
||||
MAINT-1392
|
||||
MAINT-873
|
||||
SUN-72
|
||||
BUG-2432
|
||||
|
|
|
|||
|
|
@ -36,10 +36,18 @@ StringVec sv(const StringVec& listof) { return listof; }
|
|||
|
||||
#if defined(LL_WINDOWS)
|
||||
#define sleep(secs) _sleep((secs) * 1000)
|
||||
#endif
|
||||
|
||||
// WOLF-300: It appears that driving a megabyte of data through an LLLeap pipe
|
||||
// causes Windows abdominal pain such that it later fails code-signing in some
|
||||
// mysterious way. Entirely suppressing these LLLeap tests pushes the failure
|
||||
// rate MUCH lower. Can we re-enable them with a smaller data size on Windows?
|
||||
const size_t BUFFERED_LENGTH = 100*1024;
|
||||
|
||||
#else // not Windows
|
||||
const size_t BUFFERED_LENGTH = 1023*1024; // try wrangling just under a megabyte of data
|
||||
|
||||
#endif
|
||||
|
||||
void waitfor(const std::vector<LLLeap*>& instances, int timeout=60)
|
||||
{
|
||||
int i;
|
||||
|
|
|
|||
|
|
@ -608,36 +608,42 @@ void LLAssetStorage::downloadCompleteCallback(
|
|||
return;
|
||||
}
|
||||
|
||||
LLUUID callback_id;
|
||||
LLAssetType::EType callback_type;
|
||||
|
||||
// Inefficient since we're doing a find through a list that may have thousands of elements.
|
||||
// This is due for refactoring; we will probably change mPendingDownloads into a set.
|
||||
request_list_t::iterator download_iter = std::find(gAssetStorage->mPendingDownloads.begin(),
|
||||
gAssetStorage->mPendingDownloads.end(),
|
||||
req);
|
||||
// If the LLAssetRequest doesn't exist in the downloads queue, then it either has already been deleted
|
||||
// by _cleanupRequests, or it's a transfer.
|
||||
|
||||
if (download_iter != gAssetStorage->mPendingDownloads.end())
|
||||
{
|
||||
req->setUUID(file_id);
|
||||
req->setType(file_type);
|
||||
// either has already been deleted by _cleanupRequests (as result req becomes invalid)
|
||||
// or it's a transfer.
|
||||
callback_id = file_id;
|
||||
callback_type = file_type;
|
||||
}
|
||||
else
|
||||
{
|
||||
// we will be deleting elements from mPendingDownloads which req should be part of, save id and type
|
||||
callback_id = req->getUUID();
|
||||
callback_type = req->getType();
|
||||
}
|
||||
|
||||
if (LL_ERR_NOERR == result)
|
||||
{
|
||||
// we might have gotten a zero-size file
|
||||
LLVFile vfile(gAssetStorage->mVFS, req->getUUID(), req->getType());
|
||||
LLVFile vfile(gAssetStorage->mVFS, callback_id, callback_type);
|
||||
if (vfile.getSize() <= 0)
|
||||
{
|
||||
LL_WARNS() << "downloadCompleteCallback has non-existent or zero-size asset " << req->getUUID() << LL_ENDL;
|
||||
LL_WARNS() << "downloadCompleteCallback has non-existent or zero-size asset " << callback_id << LL_ENDL;
|
||||
|
||||
result = LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE;
|
||||
vfile.remove();
|
||||
}
|
||||
}
|
||||
|
||||
// we will be deleting elements of mPendingDownloads which req might be part of, save id and type for reference
|
||||
LLUUID callback_id = req->getUUID();
|
||||
LLAssetType::EType callback_type = req->getType();
|
||||
|
||||
// find and callback ALL pending requests for this UUID
|
||||
// SJB: We process the callbacks in reverse order, I do not know if this is important,
|
||||
// but I didn't want to mess with it.
|
||||
|
|
|
|||
|
|
@ -63,6 +63,9 @@
|
|||
#include "glh/glh_linear.h"
|
||||
#include "llmatrix4a.h"
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
|
||||
// <FS:ND> Logging for error and warning messages from colladadom
|
||||
#include "dae/daeErrorHandler.h"
|
||||
|
||||
|
|
@ -268,7 +271,10 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
|
|||
|
||||
// Don't share verts within the same tri, degenerate
|
||||
//
|
||||
if ((indices.size() % 3) && (indices[indices.size()-1] != shared_index))
|
||||
U32 indx_size = indices.size();
|
||||
U32 verts_new_tri = indx_size % 3;
|
||||
if ((verts_new_tri < 1 || indices[indx_size - 1] != shared_index)
|
||||
&& (verts_new_tri < 2 || indices[indx_size - 2] != shared_index))
|
||||
{
|
||||
found = true;
|
||||
indices.push_back(shared_index);
|
||||
|
|
@ -853,8 +859,7 @@ LLDAELoader::LLDAELoader(
|
|||
opaque_userdata,
|
||||
jointMap,
|
||||
jointsFromNodes),
|
||||
mGeneratedModelLimit(modelLimit),
|
||||
mForceIdNaming(false)
|
||||
mGeneratedModelLimit(modelLimit)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -887,9 +892,11 @@ bool LLDAELoader::OpenFile(const std::string& filename)
|
|||
|
||||
//no suitable slm exists, load from the .dae file
|
||||
DAE dae;
|
||||
|
||||
std::string fileURI = "from memory"; // set to a null device
|
||||
// <FS:Ansariel> Bug fixes in mesh importer by Drake Arconis
|
||||
//domCOLLADA* dom = dae.open(filename);
|
||||
domCOLLADA* dom = dae.open(tmp_file);
|
||||
//domCOLLADA* dom = dae.openFromMemory(fileURI, preprocessDAE(filename).c_str());
|
||||
domCOLLADA* dom = dae.openFromMemory(fileURI, preprocessDAE(tmp_file).c_str());
|
||||
// </FS:Ansariel>
|
||||
|
||||
if (!dom)
|
||||
|
|
@ -918,10 +925,7 @@ bool LLDAELoader::OpenFile(const std::string& filename)
|
|||
|
||||
daeInt count = db->getElementCount(NULL, COLLADA_TYPE_MESH);
|
||||
|
||||
// <FS:Ansariel> Bug fixes in mesh importer by Drake Arconis
|
||||
//daeDocument* doc = dae.getDoc(mFilename);
|
||||
daeDocument* doc = dae.getDoc(tmp_file);
|
||||
// </FS:Ansariel>
|
||||
daeDocument* doc = dae.getDoc(fileURI);
|
||||
if (!doc)
|
||||
{
|
||||
LL_WARNS() << "can't find internal doc" << LL_ENDL;
|
||||
|
|
@ -992,32 +996,6 @@ bool LLDAELoader::OpenFile(const std::string& filename)
|
|||
|
||||
mTransform.condition();
|
||||
|
||||
mForceIdNaming = false;
|
||||
std::vector<std::string> checkNames;
|
||||
for (daeInt idx = 0; idx < count; ++idx)
|
||||
{
|
||||
domMesh* mesh = NULL;
|
||||
db->getElement((daeElement**)&mesh, idx, NULL, COLLADA_TYPE_MESH);
|
||||
|
||||
if (mesh)
|
||||
{
|
||||
std::string name = getLodlessLabel(mesh, false);
|
||||
|
||||
std::vector<std::string>::iterator it;
|
||||
it = std::find(checkNames.begin(), checkNames.end(), name);
|
||||
if (it != checkNames.end())
|
||||
{
|
||||
LL_WARNS() << "document has duplicate names, using IDs instead" << LL_ENDL;
|
||||
mForceIdNaming = true;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
checkNames.push_back(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
U32 submodel_limit = count > 0 ? mGeneratedModelLimit/count : 0;
|
||||
for (daeInt idx = 0; idx < count; ++idx)
|
||||
{ //build map of domEntities to LLModel
|
||||
|
|
@ -1125,6 +1103,41 @@ bool LLDAELoader::OpenFile(const std::string& filename)
|
|||
return true;
|
||||
}
|
||||
|
||||
std::string LLDAELoader::preprocessDAE(std::string filename)
|
||||
{
|
||||
// Open a DAE file for some preprocessing (like removing space characters in IDs), see MAINT-5678
|
||||
std::ifstream inFile;
|
||||
inFile.open(filename.c_str(), std::ios_base::in);
|
||||
std::stringstream strStream;
|
||||
strStream << inFile.rdbuf();
|
||||
std::string buffer = strStream.str();
|
||||
|
||||
LL_INFOS() << "Preprocessing dae file to remove spaces from the names, ids, etc." << LL_ENDL;
|
||||
|
||||
try
|
||||
{
|
||||
boost::regex re("\"[\\w\\.@#$-]*(\\s[\\w\\.@#$-]*)+\"");
|
||||
boost::sregex_iterator next(buffer.begin(), buffer.end(), re);
|
||||
boost::sregex_iterator end;
|
||||
while (next != end)
|
||||
{
|
||||
boost::smatch match = *next;
|
||||
std::string s = match.str();
|
||||
LL_INFOS() << s << " found" << LL_ENDL;
|
||||
boost::replace_all(s, " ", "_");
|
||||
LL_INFOS() << "Replacing with " << s << LL_ENDL;
|
||||
boost::replace_all(buffer, match.str(), s);
|
||||
next++;
|
||||
}
|
||||
}
|
||||
catch (boost::regex_error &)
|
||||
{
|
||||
LL_INFOS() << "Regex error" << LL_ENDL;
|
||||
}
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, domMesh* mesh, domSkin* skin)
|
||||
{
|
||||
llassert(model && dae && mesh && skin);
|
||||
|
|
@ -2018,7 +2031,7 @@ void LLDAELoader::processElement( daeElement* element, bool& badElement, DAE* da
|
|||
|
||||
if (model->mLabel.empty())
|
||||
{
|
||||
label = getLodlessLabel(instance_geo, mForceIdNaming);
|
||||
label = getLodlessLabel(instance_geo);
|
||||
|
||||
llassert(!label.empty());
|
||||
|
||||
|
|
@ -2233,17 +2246,12 @@ LLImportMaterial LLDAELoader::profileToMaterial(domProfile_COMMON* material, DAE
|
|||
return mat;
|
||||
}
|
||||
|
||||
std::string LLDAELoader::getElementLabel(daeElement *element)
|
||||
{
|
||||
return getElementLabel(element, mForceIdNaming);
|
||||
}
|
||||
|
||||
// try to get a decent label for this element
|
||||
std::string LLDAELoader::getElementLabel(daeElement *element, bool forceIdNaming)
|
||||
std::string LLDAELoader::getElementLabel(daeElement *element)
|
||||
{
|
||||
// if we have a name attribute, use it
|
||||
std::string name = element->getAttribute("name");
|
||||
if (name.length() && !forceIdNaming)
|
||||
if (name.length())
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
|
@ -2266,7 +2274,7 @@ std::string LLDAELoader::getElementLabel(daeElement *element, bool forceIdNaming
|
|||
|
||||
// if parent has a name or ID, use it
|
||||
std::string name = parent->getAttribute("name");
|
||||
if (!name.length() || forceIdNaming)
|
||||
if (!name.length())
|
||||
{
|
||||
name = std::string(parent->getID());
|
||||
}
|
||||
|
|
@ -2312,9 +2320,9 @@ size_t LLDAELoader::getSuffixPosition(std::string label)
|
|||
}
|
||||
|
||||
// static
|
||||
std::string LLDAELoader::getLodlessLabel(daeElement *element, bool forceIdNaming)
|
||||
std::string LLDAELoader::getLodlessLabel(daeElement *element)
|
||||
{
|
||||
std::string label = getElementLabel(element, forceIdNaming);
|
||||
std::string label = getElementLabel(element);
|
||||
size_t ext_pos = getSuffixPosition(label);
|
||||
if (ext_pos != -1)
|
||||
{
|
||||
|
|
@ -2423,13 +2431,8 @@ bool LLDAELoader::addVolumeFacesFromDomMesh(LLModel* pModel,domMesh* mesh)
|
|||
return (status == LLModel::NO_ERRORS);
|
||||
}
|
||||
|
||||
LLModel* LLDAELoader::loadModelFromDomMesh(domMesh *mesh)
|
||||
{
|
||||
return loadModelFromDomMesh(mesh, mForceIdNaming);
|
||||
}
|
||||
|
||||
//static
|
||||
LLModel* LLDAELoader::loadModelFromDomMesh(domMesh *mesh, bool forceIdNaming)
|
||||
LLModel* LLDAELoader::loadModelFromDomMesh(domMesh *mesh)
|
||||
{
|
||||
LLVolumeParams volume_params;
|
||||
volume_params.setType(LL_PCODE_PROFILE_SQUARE, LL_PCODE_PATH_LINE);
|
||||
|
|
@ -2437,7 +2440,7 @@ LLModel* LLDAELoader::loadModelFromDomMesh(domMesh *mesh, bool forceIdNaming)
|
|||
createVolumeFacesFromDomMesh(ret, mesh);
|
||||
if (ret->mLabel.empty())
|
||||
{
|
||||
ret->mLabel = getElementLabel(mesh, forceIdNaming);
|
||||
ret->mLabel = getElementLabel(mesh);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -2455,7 +2458,7 @@ bool LLDAELoader::loadModelsFromDomMesh(domMesh* mesh, std::vector<LLModel*>& mo
|
|||
|
||||
LLModel* ret = new LLModel(volume_params, 0.f);
|
||||
|
||||
std::string model_name = getLodlessLabel(mesh, mForceIdNaming);
|
||||
std::string model_name = getLodlessLabel(mesh);
|
||||
ret->mLabel = model_name + lod_suffix[mLod];
|
||||
|
||||
llassert(!ret->mLabel.empty());
|
||||
|
|
|
|||
|
|
@ -89,22 +89,21 @@ protected:
|
|||
static bool addVolumeFacesFromDomMesh(LLModel* model, domMesh* mesh);
|
||||
static bool createVolumeFacesFromDomMesh(LLModel* model, domMesh *mesh);
|
||||
|
||||
static LLModel* loadModelFromDomMesh(domMesh* mesh, bool forceIdNaming);
|
||||
LLModel* loadModelFromDomMesh(domMesh* mesh);
|
||||
static LLModel* loadModelFromDomMesh(domMesh* mesh);
|
||||
|
||||
// Loads a mesh breaking it into one or more models as necessary
|
||||
// to get around volume face limitations while retaining >8 materials
|
||||
//
|
||||
bool loadModelsFromDomMesh(domMesh* mesh, std::vector<LLModel*>& models_out, U32 submodel_limit);
|
||||
|
||||
static std::string getElementLabel(daeElement *element, bool forceIdNaming);
|
||||
std::string getElementLabel(daeElement *element);
|
||||
static std::string getElementLabel(daeElement *element);
|
||||
static size_t getSuffixPosition(std::string label);
|
||||
static std::string getLodlessLabel(daeElement *element, bool forceIdNaming = false);
|
||||
static std::string getLodlessLabel(daeElement *element);
|
||||
|
||||
static std::string preprocessDAE(std::string filename);
|
||||
|
||||
private:
|
||||
U32 mGeneratedModelLimit; // Attempt to limit amount of generated submodels
|
||||
bool mForceIdNaming;
|
||||
|
||||
};
|
||||
#endif // LL_LLDAELLOADER_H
|
||||
|
|
|
|||
|
|
@ -94,26 +94,33 @@ BOOL LLFontGL::loadFace(const std::string& filename, F32 point_size, F32 vert_dp
|
|||
|
||||
static LLTrace::BlockTimerStatHandle FTM_RENDER_FONTS("Fonts");
|
||||
|
||||
S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRect& rect, const LLColor4 &color, HAlign halign, VAlign valign, U8 style,
|
||||
S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRect& rect, const LLColor4 &color, HAlign halign, VAlign valign, U8 style,
|
||||
ShadowType shadow, S32 max_chars, F32* right_x, BOOL use_ellipses) const
|
||||
{
|
||||
LLRectf rect_float(rect.mLeft, rect.mTop, rect.mRight, rect.mBottom);
|
||||
return render(wstr, begin_offset, rect_float, color, halign, valign, style, shadow, max_chars, right_x, use_ellipses);
|
||||
}
|
||||
|
||||
S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRectf& rect, const LLColor4 &color, HAlign halign, VAlign valign, U8 style,
|
||||
ShadowType shadow, S32 max_chars, F32* right_x, BOOL use_ellipses) const
|
||||
{
|
||||
F32 x = (F32)rect.mLeft;
|
||||
F32 x = rect.mLeft;
|
||||
F32 y = 0.f;
|
||||
|
||||
switch(valign)
|
||||
{
|
||||
case TOP:
|
||||
y = (F32)rect.mTop;
|
||||
y = rect.mTop;
|
||||
break;
|
||||
case VCENTER:
|
||||
y = (F32)rect.getCenterY();
|
||||
y = rect.getCenterY();
|
||||
break;
|
||||
case BASELINE:
|
||||
case BOTTOM:
|
||||
y = (F32)rect.mBottom;
|
||||
y = rect.mBottom;
|
||||
break;
|
||||
default:
|
||||
y = (F32)rect.mBottom;
|
||||
y = rect.mBottom;
|
||||
break;
|
||||
}
|
||||
return render(wstr, begin_offset, x, y, color, halign, valign, style, shadow, max_chars, rect.getWidth(), right_x, use_ellipses);
|
||||
|
|
@ -357,7 +364,12 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
|
|||
|
||||
if (right_x)
|
||||
{
|
||||
*right_x = (cur_x - origin.mV[VX]) / sScaleX;
|
||||
F32 cr_x = (cur_x - origin.mV[VX]) / sScaleX;
|
||||
if (*right_x < cr_x)
|
||||
{
|
||||
// rightmost edge of previously drawn text, don't draw over previous text
|
||||
*right_x = cr_x;
|
||||
}
|
||||
}
|
||||
|
||||
//FIXME: add underline as glyph?
|
||||
|
|
|
|||
|
|
@ -98,6 +98,15 @@ public:
|
|||
F32* right_x=NULL,
|
||||
BOOL use_ellipses = FALSE) const;
|
||||
|
||||
S32 render(const LLWString &text, S32 begin_offset,
|
||||
const LLRectf& rect,
|
||||
const LLColor4 &color,
|
||||
HAlign halign = LEFT, VAlign valign = BASELINE,
|
||||
U8 style = NORMAL, ShadowType shadow = NO_SHADOW,
|
||||
S32 max_chars = S32_MAX,
|
||||
F32* right_x=NULL,
|
||||
BOOL use_ellipses = FALSE) const;
|
||||
|
||||
S32 render(const LLWString &text, S32 begin_offset,
|
||||
F32 x, F32 y,
|
||||
const LLColor4 &color,
|
||||
|
|
|
|||
|
|
@ -327,6 +327,14 @@ LLGLSLShader::~LLGLSLShader()
|
|||
}
|
||||
|
||||
void LLGLSLShader::unload()
|
||||
{
|
||||
mShaderFiles.clear();
|
||||
mDefines.clear();
|
||||
|
||||
unloadInternal();
|
||||
}
|
||||
|
||||
void LLGLSLShader::unloadInternal()
|
||||
{
|
||||
sInstances.erase(this);
|
||||
|
||||
|
|
@ -334,8 +342,6 @@ void LLGLSLShader::unload()
|
|||
mAttribute.clear();
|
||||
mTexture.clear();
|
||||
mUniform.clear();
|
||||
mShaderFiles.clear();
|
||||
mDefines.clear();
|
||||
|
||||
if (mProgramObject)
|
||||
{
|
||||
|
|
@ -357,13 +363,13 @@ void LLGLSLShader::unload()
|
|||
|
||||
mProgramObject = 0;
|
||||
}
|
||||
|
||||
|
||||
if (mTimerQuery)
|
||||
{
|
||||
glDeleteQueriesARB(1, &mTimerQuery);
|
||||
mTimerQuery = 0;
|
||||
}
|
||||
|
||||
|
||||
if (mSamplesQuery)
|
||||
{
|
||||
glDeleteQueriesARB(1, &mSamplesQuery);
|
||||
|
|
@ -372,7 +378,7 @@ void LLGLSLShader::unload()
|
|||
|
||||
//hack to make apple not complain
|
||||
glGetError();
|
||||
|
||||
|
||||
stop_glerror();
|
||||
}
|
||||
|
||||
|
|
@ -381,6 +387,8 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes,
|
|||
U32 varying_count,
|
||||
const char** varyings)
|
||||
{
|
||||
unloadInternal();
|
||||
|
||||
sInstances.insert(this);
|
||||
|
||||
//reloading, reset matrix hash values
|
||||
|
|
|
|||
|
|
@ -198,7 +198,9 @@ public:
|
|||
bool mTextureStateFetched;
|
||||
std::vector<U32> mTextureMagFilter;
|
||||
std::vector<U32> mTextureMinFilter;
|
||||
|
||||
|
||||
private:
|
||||
void unloadInternal();
|
||||
};
|
||||
|
||||
//UI shader (declared here so llui_libtest will link properly)
|
||||
|
|
|
|||
|
|
@ -54,7 +54,9 @@ LLIconCtrl::LLIconCtrl(const LLIconCtrl::Params& p)
|
|||
mUseDrawContextAlpha(p.use_draw_context_alpha),
|
||||
mPriority(0),
|
||||
mMinWidth(p.min_width),
|
||||
mMinHeight(p.min_height)
|
||||
mMinHeight(p.min_height),
|
||||
mMaxWidth(0),
|
||||
mMaxHeight(0)
|
||||
{
|
||||
if (mImagep.notNull())
|
||||
{
|
||||
|
|
@ -104,7 +106,15 @@ void LLIconCtrl::setValue(const LLSD& value )
|
|||
&& mMinWidth
|
||||
&& mMinHeight)
|
||||
{
|
||||
mImagep->getImage()->setKnownDrawSize(llmax(mMinWidth, mImagep->getWidth()), llmax(mMinHeight, mImagep->getHeight()));
|
||||
S32 desired_draw_width = llmax(mMinWidth, mImagep->getWidth());
|
||||
S32 desired_draw_height = llmax(mMinHeight, mImagep->getHeight());
|
||||
if (mMaxWidth && mMaxHeight)
|
||||
{
|
||||
desired_draw_width = llmin(desired_draw_width, mMaxWidth);
|
||||
desired_draw_height = llmin(desired_draw_height, mMaxHeight);
|
||||
}
|
||||
|
||||
mImagep->getImage()->setKnownDrawSize(desired_draw_width, desired_draw_height);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,9 @@ protected:
|
|||
|
||||
//the output size of the icon image if set.
|
||||
S32 mMinWidth,
|
||||
mMinHeight;
|
||||
mMinHeight,
|
||||
mMaxWidth,
|
||||
mMaxHeight;
|
||||
|
||||
// If set to true (default), use the draw context transparency.
|
||||
// If false, will use transparency returned by getCurrentTransparency(). See STORM-698.
|
||||
|
|
|
|||
|
|
@ -751,7 +751,7 @@ void LLTextBase::drawText()
|
|||
line_end = next_start;
|
||||
}
|
||||
|
||||
LLRect text_rect(line.mRect);
|
||||
LLRectf text_rect(line.mRect.mLeft, line.mRect.mTop, line.mRect.mRight, line.mRect.mBottom);
|
||||
text_rect.mRight = mDocumentView->getRect().getWidth(); // clamp right edge to document extents
|
||||
text_rect.translate(mDocumentView->getRect().mLeft, mDocumentView->getRect().mBottom); // adjust by scroll position
|
||||
|
||||
|
|
@ -824,7 +824,7 @@ void LLTextBase::drawText()
|
|||
++misspell_it;
|
||||
}
|
||||
|
||||
text_rect.mLeft = (S32)(cur_segment->draw(seg_start - cur_segment->getStart(), clipped_end, selection_left, selection_right, text_rect));
|
||||
text_rect.mLeft = cur_segment->draw(seg_start - cur_segment->getStart(), clipped_end, selection_left, selection_right, text_rect);
|
||||
|
||||
seg_start = clipped_end + cur_segment->getStart();
|
||||
}
|
||||
|
|
@ -3316,7 +3316,7 @@ bool LLTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width, S32
|
|||
S32 LLTextSegment::getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const { return 0; }
|
||||
S32 LLTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const { return 0; }
|
||||
void LLTextSegment::updateLayout(const LLTextBase& editor) {}
|
||||
F32 LLTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect) { return draw_rect.mLeft; }
|
||||
F32 LLTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect) { return draw_rect.mLeft; }
|
||||
bool LLTextSegment::canEdit() const { return false; }
|
||||
void LLTextSegment::unlinkFromDocument(LLTextBase*) {}
|
||||
void LLTextSegment::linkToDocument(LLTextBase*) {}
|
||||
|
|
@ -3382,7 +3382,7 @@ LLNormalTextSegment::~LLNormalTextSegment()
|
|||
}
|
||||
|
||||
|
||||
F32 LLNormalTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect)
|
||||
F32 LLNormalTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect)
|
||||
{
|
||||
if( end - start > 0 )
|
||||
{
|
||||
|
|
@ -3392,7 +3392,7 @@ F32 LLNormalTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selec
|
|||
}
|
||||
|
||||
// Draws a single text segment, reversing the color for selection if needed.
|
||||
F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 selection_start, S32 selection_end, LLRect rect)
|
||||
F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 selection_start, S32 selection_end, LLRectf rect)
|
||||
{
|
||||
F32 alpha = LLViewDrawContext::getCurrentContext().mAlpha;
|
||||
|
||||
|
|
@ -3424,7 +3424,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
|
|||
&right_x,
|
||||
mEditor.getUseEllipses());
|
||||
}
|
||||
rect.mLeft = (S32)ceil(right_x);
|
||||
rect.mLeft = right_x;
|
||||
|
||||
if( (selection_start < seg_end) && (selection_end > seg_start) )
|
||||
{
|
||||
|
|
@ -3443,7 +3443,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
|
|||
&right_x,
|
||||
mEditor.getUseEllipses());
|
||||
}
|
||||
rect.mLeft = (S32)ceil(right_x);
|
||||
rect.mLeft = right_x;
|
||||
if( selection_end < seg_end )
|
||||
{
|
||||
// Draw normally
|
||||
|
|
@ -3460,7 +3460,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
|
|||
&right_x,
|
||||
mEditor.getUseEllipses());
|
||||
}
|
||||
return right_x;
|
||||
return right_x;
|
||||
}
|
||||
|
||||
BOOL LLNormalTextSegment::handleHover(S32 x, S32 y, MASK mask)
|
||||
|
|
@ -3704,7 +3704,7 @@ LLOnHoverChangeableTextSegment::LLOnHoverChangeableTextSegment( LLStyleConstSP s
|
|||
mNormalStyle(normal_style){}
|
||||
|
||||
/*virtual*/
|
||||
F32 LLOnHoverChangeableTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect)
|
||||
F32 LLOnHoverChangeableTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect)
|
||||
{
|
||||
F32 result = LLNormalTextSegment::draw(start, end, selection_start, selection_end, draw_rect);
|
||||
if (end == mEnd - mStart)
|
||||
|
|
@ -3782,7 +3782,7 @@ void LLInlineViewSegment::updateLayout(const LLTextBase& editor)
|
|||
mView->setOrigin(start_rect.mLeft + mLeftPad, start_rect.mBottom + mBottomPad);
|
||||
}
|
||||
|
||||
F32 LLInlineViewSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect)
|
||||
F32 LLInlineViewSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect)
|
||||
{
|
||||
// return padded width of widget
|
||||
// widget is actually drawn during mDocumentView's draw()
|
||||
|
|
@ -3823,7 +3823,7 @@ S32 LLLineBreakTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32
|
|||
{
|
||||
return 1;
|
||||
}
|
||||
F32 LLLineBreakTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect)
|
||||
F32 LLLineBreakTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect)
|
||||
{
|
||||
return draw_rect.mLeft;
|
||||
}
|
||||
|
|
@ -3889,7 +3889,7 @@ void LLImageTextSegment::setToolTip(const std::string& tooltip)
|
|||
mTooltip = tooltip;
|
||||
}
|
||||
|
||||
F32 LLImageTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect)
|
||||
F32 LLImageTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect)
|
||||
{
|
||||
if ( (start >= 0) && (end <= mEnd - mStart))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public:
|
|||
virtual S32 getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const;
|
||||
virtual S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const;
|
||||
virtual void updateLayout(const class LLTextBase& editor);
|
||||
virtual F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect);
|
||||
virtual F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
|
||||
virtual bool canEdit() const;
|
||||
virtual void unlinkFromDocument(class LLTextBase* editor);
|
||||
virtual void linkToDocument(class LLTextBase* editor);
|
||||
|
|
@ -117,7 +117,7 @@ public:
|
|||
/*virtual*/ bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;
|
||||
/*virtual*/ S32 getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const;
|
||||
/*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const;
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect);
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
|
||||
/*virtual*/ bool canEdit() const { return true; }
|
||||
/*virtual*/ const LLColor4& getColor() const { return mStyle->getColor(); }
|
||||
/*virtual*/ LLStyleConstSP getStyle() const { return mStyle; }
|
||||
|
|
@ -135,7 +135,7 @@ public:
|
|||
/*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
|
||||
|
||||
protected:
|
||||
F32 drawClippedSegment(S32 seg_start, S32 seg_end, S32 selection_start, S32 selection_end, LLRect rect);
|
||||
F32 drawClippedSegment(S32 seg_start, S32 seg_end, S32 selection_start, S32 selection_end, LLRectf rect);
|
||||
|
||||
virtual const LLWString& getWText() const;
|
||||
virtual const S32 getLength() const;
|
||||
|
|
@ -169,7 +169,7 @@ class LLOnHoverChangeableTextSegment : public LLNormalTextSegment
|
|||
{
|
||||
public:
|
||||
LLOnHoverChangeableTextSegment( LLStyleConstSP style, LLStyleConstSP normal_style, S32 start, S32 end, LLTextBase& editor );
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect);
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
|
||||
/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
|
||||
protected:
|
||||
// Style used for text when mouse pointer is over segment
|
||||
|
|
@ -203,7 +203,7 @@ public:
|
|||
/*virtual*/ bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;
|
||||
/*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const;
|
||||
/*virtual*/ void updateLayout(const class LLTextBase& editor);
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect);
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
|
||||
/*virtual*/ bool canEdit() const { return false; }
|
||||
/*virtual*/ void unlinkFromDocument(class LLTextBase* editor);
|
||||
/*virtual*/ void linkToDocument(class LLTextBase* editor);
|
||||
|
|
@ -226,7 +226,7 @@ public:
|
|||
~LLLineBreakTextSegment();
|
||||
bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;
|
||||
S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const;
|
||||
F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect);
|
||||
F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
|
||||
|
||||
private:
|
||||
S32 mFontHeight;
|
||||
|
|
@ -239,7 +239,7 @@ public:
|
|||
~LLImageTextSegment();
|
||||
bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;
|
||||
S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const;
|
||||
F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect);
|
||||
F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
|
||||
|
||||
/*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
|
||||
/*virtual*/ void setToolTip(const std::string& tooltip);
|
||||
|
|
|
|||
|
|
@ -233,8 +233,8 @@ LLUrlEntryHTTP::LLUrlEntryHTTP()
|
|||
: LLUrlEntryBase()
|
||||
{
|
||||
// <FS:Ansariel> FIRE-1715: Links using FTP protocol are not recognized
|
||||
//mPattern = boost::regex("https?://([-\\w\\.]+)+(:\\d+)?(:\\w+)?(@\\d+)?(@\\w+)?\\.[a-z](:\\d+)?(:\\w+)?(@\\d+)?(@\\w+)?/?\\S*",
|
||||
mPattern = boost::regex("(https?|ftp)://([-\\w\\.]+)+(:\\d+)?(:\\w+)?(@\\d+)?(@\\w+)?\\.[a-z](:\\d+)?(:\\w+)?(@\\d+)?(@\\w+)?/?\\S*",
|
||||
//mPattern = boost::regex("https?://([^\\s/?\\.#]+\\.?)+\\.\\w+(:\\d+)?(/\\S*)?",
|
||||
mPattern = boost::regex("(https?|ftp)://([^\\s/?\\.#]+\\.?)+\\.\\w+(:\\d+)?(/\\S*)?",
|
||||
// </FS:Ansariel>
|
||||
boost::regex::perl|boost::regex::icase);
|
||||
mMenuName = "menu_url_http.xml";
|
||||
|
|
|
|||
|
|
@ -232,6 +232,14 @@ namespace tut
|
|||
testRegex("http url with newlines", url,
|
||||
"XX\nhttp://www.secondlife.com/\nXX",
|
||||
"http://www.secondlife.com/");
|
||||
|
||||
testRegex("http url without tld shouldn't be decorated (1)", url,
|
||||
"http://test",
|
||||
"");
|
||||
|
||||
testRegex("http url without tld shouldn't be decorated (2)", url,
|
||||
"http://test .com",
|
||||
"");
|
||||
}
|
||||
|
||||
template<> template<>
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ private:
|
|||
bool onHTTPAuthCallback(const std::string host, const std::string realm, std::string& username, std::string& password);
|
||||
void onCursorChangedCallback(LLCEFLib::ECursorType type, unsigned int handle);
|
||||
void onFileDownloadCallback(std::string filename);
|
||||
const std::string onFileDialogCallback();
|
||||
|
||||
void postDebugMessage(const std::string& msg);
|
||||
void authResponse(LLPluginMessage &message);
|
||||
|
|
@ -102,6 +103,7 @@ private:
|
|||
bool mCanPaste;
|
||||
std::string mCachePath;
|
||||
std::string mCookiePath;
|
||||
std::string mPickedFile;
|
||||
LLCEFLib* mLLCEFLib;
|
||||
|
||||
VolumeCatcher mVolumeCatcher;
|
||||
|
|
@ -142,6 +144,7 @@ MediaPluginBase(host_send_func, host_user_data)
|
|||
mCanPaste = false;
|
||||
mCachePath = "";
|
||||
mCookiePath = "";
|
||||
mPickedFile = "";
|
||||
mLLCEFLib = new LLCEFLib();
|
||||
|
||||
// <FS:ND> FS specific CEF settings
|
||||
|
|
@ -393,6 +396,20 @@ void MediaPluginCEF::onFileDownloadCallback(const std::string filename)
|
|||
sendMessage(message);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
const std::string MediaPluginCEF::onFileDialogCallback()
|
||||
{
|
||||
mPickedFile.clear();
|
||||
|
||||
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "pick_file");
|
||||
message.setValueBoolean("blocking_request", true);
|
||||
|
||||
sendMessage(message);
|
||||
|
||||
return mPickedFile;
|
||||
}
|
||||
|
||||
void MediaPluginCEF::onCursorChangedCallback(LLCEFLib::ECursorType type, unsigned int handle)
|
||||
{
|
||||
std::string name = "";
|
||||
|
|
@ -533,6 +550,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
|
|||
mLLCEFLib->setOnNavigateURLCallback(boost::bind(&MediaPluginCEF::onNavigateURLCallback, this, _1, _2));
|
||||
mLLCEFLib->setOnHTTPAuthCallback(boost::bind(&MediaPluginCEF::onHTTPAuthCallback, this, _1, _2, _3, _4));
|
||||
mLLCEFLib->setOnFileDownloadCallback(boost::bind(&MediaPluginCEF::onFileDownloadCallback, this, _1));
|
||||
mLLCEFLib->setOnFileDialogCallback(boost::bind(&MediaPluginCEF::onFileDialogCallback, this));
|
||||
mLLCEFLib->setOnCursorChangedCallback(boost::bind(&MediaPluginCEF::onCursorChangedCallback, this, _1, _2));
|
||||
mLLCEFLib->setOnRequestExitCallback(boost::bind(&MediaPluginCEF::onRequestExitCallback, this));
|
||||
|
||||
|
|
@ -748,6 +766,10 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
|
|||
{
|
||||
mEnableMediaPluginDebugging = message_in.getValueBoolean("enable");
|
||||
}
|
||||
if (message_name == "pick_file_response")
|
||||
{
|
||||
mPickedFile = message_in.getValue("file");
|
||||
}
|
||||
if (message_name == "auth_response")
|
||||
{
|
||||
authResponse(message_in);
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@
|
|||
<file>ヒラギノ角ゴシック W3.ttc</file>
|
||||
<file>ヒラギノ角ゴ Pro W3.otf</file>
|
||||
<file>ヒラギノ角ゴ ProN W3.otf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>AppleGothic.dfont</file>
|
||||
<file>AppleGothic.ttf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>华文细黑.ttf</file>
|
||||
</os>
|
||||
</font>
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@
|
|||
<os name="Mac">
|
||||
<file>ヒラギノ角ゴ Pro W3.otf</file>
|
||||
<file>ヒラギノ角ゴ ProN W3.otf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>AppleGothic.dfont</file>
|
||||
<file>AppleGothic.ttf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>华文细黑.ttf</file>
|
||||
</os>
|
||||
</font>
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@
|
|||
<os name="Mac">
|
||||
<file>ヒラギノ角ゴ Pro W3.otf</file>
|
||||
<file>ヒラギノ角ゴ ProN W3.otf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>AppleGothic.dfont</file>
|
||||
<file>AppleGothic.ttf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>华文细黑.ttf</file>
|
||||
</os>
|
||||
</font>
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@
|
|||
<os name="Mac">
|
||||
<file>ヒラギノ角ゴ Pro W3.otf</file>
|
||||
<file>ヒラギノ角ゴ ProN W3.otf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>AppleGothic.dfont</file>
|
||||
<file>AppleGothic.ttf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>华文细黑.ttf</file>
|
||||
</os>
|
||||
</font>
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@
|
|||
<os name="Mac">
|
||||
<file>ヒラギノ角ゴ Pro W3.otf</file>
|
||||
<file>ヒラギノ角ゴ ProN W3.otf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>AppleGothic.dfont</file>
|
||||
<file>AppleGothic.ttf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>华文细黑.ttf</file>
|
||||
</os>
|
||||
</font>
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@
|
|||
<os name="Mac">
|
||||
<file>ヒラギノ角ゴ Pro W3.otf</file>
|
||||
<file>ヒラギノ角ゴ ProN W3.otf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>AppleGothic.dfont</file>
|
||||
<file>AppleGothic.ttf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>华文细黑.ttf</file>
|
||||
</os>
|
||||
</font>
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@
|
|||
<os name="Mac">
|
||||
<file>ヒラギノ角ゴ Pro W3.otf</file>
|
||||
<file>ヒラギノ角ゴ ProN W3.otf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>AppleGothic.dfont</file>
|
||||
<file>AppleGothic.ttf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>华文细黑.ttf</file>
|
||||
</os>
|
||||
</font>
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@
|
|||
<os name="Mac">
|
||||
<file>ヒラギノ角ゴ Pro W3.otf</file>
|
||||
<file>ヒラギノ角ゴ ProN W3.otf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>AppleGothic.dfont</file>
|
||||
<file>AppleGothic.ttf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>华文细黑.ttf</file>
|
||||
</os>
|
||||
</font>
|
||||
|
|
|
|||
|
|
@ -3762,7 +3762,7 @@ void LLAgent::initOriginGlobal(const LLVector3d &origin_global)
|
|||
}
|
||||
|
||||
BOOL LLAgent::leftButtonGrabbed() const
|
||||
{
|
||||
{
|
||||
const BOOL camera_mouse_look = gAgentCamera.cameraMouselook();
|
||||
return (!camera_mouse_look && mControlsTakenCount[CONTROL_LBUTTON_DOWN_INDEX] > 0)
|
||||
|| (camera_mouse_look && mControlsTakenCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0)
|
||||
|
|
@ -3770,6 +3770,13 @@ BOOL LLAgent::leftButtonGrabbed() const
|
|||
|| (camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0);
|
||||
}
|
||||
|
||||
BOOL LLAgent::leftButtonBlocked() const
|
||||
{
|
||||
const BOOL camera_mouse_look = gAgentCamera.cameraMouselook();
|
||||
return (!camera_mouse_look && mControlsTakenCount[CONTROL_LBUTTON_DOWN_INDEX] > 0)
|
||||
|| (camera_mouse_look && mControlsTakenCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0);
|
||||
}
|
||||
|
||||
BOOL LLAgent::rotateGrabbed() const
|
||||
{
|
||||
return (mControlsTakenCount[CONTROL_YAW_POS_INDEX] > 0)
|
||||
|
|
@ -4320,7 +4327,14 @@ BOOL LLAgent::anyControlGrabbed() const
|
|||
|
||||
BOOL LLAgent::isControlGrabbed(S32 control_index) const
|
||||
{
|
||||
return mControlsTakenCount[control_index] > 0;
|
||||
if (gAgent.mControlsTakenCount[control_index] > 0)
|
||||
return TRUE;
|
||||
return gAgent.mControlsTakenPassedOnCount[control_index] > 0;
|
||||
}
|
||||
|
||||
BOOL LLAgent::isControlBlocked(S32 control_index) const
|
||||
{
|
||||
return mControlsTakenCount[control_index] > 0;
|
||||
}
|
||||
|
||||
void LLAgent::forceReleaseControls()
|
||||
|
|
@ -4543,6 +4557,7 @@ void LLAgent::startTeleportRequest()
|
|||
}
|
||||
if (hasPendingTeleportRequest())
|
||||
{
|
||||
mTeleportCanceled.reset();
|
||||
if (!isMaturityPreferenceSyncedWithServer())
|
||||
{
|
||||
gTeleportDisplay = TRUE;
|
||||
|
|
@ -4572,6 +4587,7 @@ void LLAgent::startTeleportRequest()
|
|||
void LLAgent::handleTeleportFinished()
|
||||
{
|
||||
clearTeleportRequest();
|
||||
mTeleportCanceled.reset();
|
||||
if (mIsMaturityRatingChangingDuringTeleport)
|
||||
{
|
||||
// notify user that the maturity preference has been changed
|
||||
|
|
@ -4727,13 +4743,25 @@ void LLAgent::teleportCancel()
|
|||
msg->addUUIDFast(_PREHASH_AgentID, getID());
|
||||
msg->addUUIDFast(_PREHASH_SessionID, getSessionID());
|
||||
sendReliableMessage();
|
||||
}
|
||||
}
|
||||
mTeleportCanceled = mTeleportRequest;
|
||||
}
|
||||
clearTeleportRequest();
|
||||
gAgent.setTeleportState( LLAgent::TELEPORT_NONE );
|
||||
gPipeline.resetVertexBuffers();
|
||||
}
|
||||
|
||||
void LLAgent::restoreCanceledTeleportRequest()
|
||||
{
|
||||
if (mTeleportCanceled != NULL)
|
||||
{
|
||||
gAgent.setTeleportState( LLAgent::TELEPORT_REQUESTED );
|
||||
mTeleportRequest = mTeleportCanceled;
|
||||
mTeleportCanceled.reset();
|
||||
gTeleportDisplay = TRUE;
|
||||
gTeleportDisplayTimer.reset();
|
||||
}
|
||||
}
|
||||
|
||||
void LLAgent::teleportViaLocation(const LLVector3d& pos_global)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -513,7 +513,8 @@ private:
|
|||
// Grab
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
BOOL leftButtonGrabbed() const;
|
||||
BOOL leftButtonGrabbed() const;
|
||||
BOOL leftButtonBlocked() const;
|
||||
BOOL rotateGrabbed() const;
|
||||
BOOL forwardGrabbed() const;
|
||||
BOOL backwardGrabbed() const;
|
||||
|
|
@ -530,8 +531,9 @@ public:
|
|||
BOOL controlFlagsDirty() const;
|
||||
void enableControlFlagReset();
|
||||
void resetControlFlags();
|
||||
BOOL anyControlGrabbed() const; // True iff a script has taken over a control
|
||||
BOOL isControlGrabbed(S32 control_index) const;
|
||||
BOOL anyControlGrabbed() const; // True if a script has taken over any control
|
||||
BOOL isControlGrabbed(S32 control_index) const; // True if a script has taken over a control
|
||||
BOOL isControlBlocked(S32 control_index) const; // Control should be ignored or won't be passed
|
||||
// Send message to simulator to force grabbed controls to be
|
||||
// released, in case of a poorly written script.
|
||||
void forceReleaseControls();
|
||||
|
|
@ -707,6 +709,7 @@ public:
|
|||
void teleportViaLocation(const LLVector3d& pos_global); // To a global location - this will probably need to be deprecated
|
||||
void teleportViaLocationLookAt(const LLVector3d& pos_global);// To a global location, preserving camera rotation
|
||||
void teleportCancel(); // May or may not be allowed by server
|
||||
void restoreCanceledTeleportRequest();
|
||||
bool getTeleportKeepsLookAt() { return mbTeleportKeepsLookAt; } // Whether look-at reset after teleport
|
||||
// <FS:TT> Client LSL Bridge
|
||||
bool teleportBridgeLocal(LLVector3& pos_local); // Teleport using LSL Bridge
|
||||
|
|
@ -736,6 +739,7 @@ private:
|
|||
friend class LLTeleportRequestViaLocationLookAt;
|
||||
|
||||
LLTeleportRequestPtr mTeleportRequest;
|
||||
LLTeleportRequestPtr mTeleportCanceled;
|
||||
boost::signals2::connection mTeleportFinishedSlot;
|
||||
boost::signals2::connection mTeleportFailedSlot;
|
||||
|
||||
|
|
|
|||
|
|
@ -900,7 +900,7 @@ void LLAgentCamera::cameraZoomIn(const F32 fraction)
|
|||
}
|
||||
|
||||
LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
|
||||
if (selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD)
|
||||
if (LLToolMgr::getInstance()->inBuildMode() && selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD)
|
||||
{
|
||||
// just update hud zoom level
|
||||
mHUDTargetZoom /= fraction;
|
||||
|
|
|
|||
|
|
@ -638,13 +638,25 @@ void AISUpdate::parseCategory(const LLSD& category_map)
|
|||
parseDescendentCount(category_id, category_map["_embedded"]);
|
||||
}
|
||||
|
||||
LLPointer<LLViewerInventoryCategory> new_cat(new LLViewerInventoryCategory(category_id));
|
||||
LLPointer<LLViewerInventoryCategory> new_cat;
|
||||
LLViewerInventoryCategory *curr_cat = gInventory.getCategory(category_id);
|
||||
if (curr_cat)
|
||||
{
|
||||
// Default to current values where not provided.
|
||||
new_cat->copyViewerCategory(curr_cat);
|
||||
}
|
||||
new_cat = new LLViewerInventoryCategory(curr_cat);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (category_map.has("agent_id"))
|
||||
{
|
||||
new_cat = new LLViewerInventoryCategory(category_map["agent_id"].asUUID());
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_DEBUGS() << "No owner provided, folder might be assigned wrong owner" << LL_ENDL;
|
||||
new_cat = new LLViewerInventoryCategory(LLUUID::null);
|
||||
}
|
||||
}
|
||||
BOOL rv = new_cat->unpackMessage(category_map);
|
||||
// *NOTE: unpackMessage does not unpack version or descendent count.
|
||||
//if (category_map.has("version"))
|
||||
|
|
|
|||
|
|
@ -182,38 +182,12 @@ LLAvatarIconCtrl::LLAvatarIconCtrl(const LLAvatarIconCtrl::Params& p)
|
|||
mSymbolPos(p.symbol_pos)
|
||||
{
|
||||
mPriority = LLViewerFetchedTexture::BOOST_ICON;
|
||||
|
||||
LLRect rect = p.rect;
|
||||
|
||||
// BottomRight is the default position
|
||||
S32 left = rect.getWidth() - mSymbolSize - mSymbolHpad;
|
||||
S32 bottom = mSymbolVpad;
|
||||
|
||||
switch(mSymbolPos)
|
||||
{
|
||||
case LLAvatarIconCtrlEnums::BOTTOM_LEFT:
|
||||
{
|
||||
left = mSymbolHpad;
|
||||
bottom = mSymbolVpad;
|
||||
}
|
||||
|
||||
case LLAvatarIconCtrlEnums::TOP_LEFT:
|
||||
{
|
||||
left = mSymbolHpad;
|
||||
bottom = rect.getHeight() - mSymbolSize - mSymbolVpad;
|
||||
}
|
||||
|
||||
case LLAvatarIconCtrlEnums::TOP_RIGHT:
|
||||
{
|
||||
left = rect.getWidth() - mSymbolSize - mSymbolHpad;
|
||||
bottom = rect.getHeight() - mSymbolSize - mSymbolVpad;
|
||||
}
|
||||
|
||||
case LLAvatarIconCtrlEnums::BOTTOM_RIGHT:
|
||||
// fallthrough, is default
|
||||
default:
|
||||
rect.setOriginAndSize(left, bottom, mSymbolSize, mSymbolSize);
|
||||
}
|
||||
// don't request larger image then necessary to save gl memory,
|
||||
// but ensure that quality is sufficient
|
||||
LLRect rect = p.rect;
|
||||
mMaxHeight = llmax((S32)p.min_height, rect.getHeight());
|
||||
mMaxWidth = llmax((S32)p.min_width, rect.getWidth());
|
||||
|
||||
if (p.avatar_id.isProvided())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -56,9 +56,9 @@ public:
|
|||
return mEditor->getDocumentView()->getRect().getWidth();
|
||||
}
|
||||
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect)
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect)
|
||||
{
|
||||
gl_line_2d(draw_rect.mLeft + 5, draw_rect.getCenterY(), draw_rect.mRight - 5, draw_rect.getCenterY(), LLColor4::grey);
|
||||
gl_line_2d((S32)(draw_rect.mLeft + 5), (S32)draw_rect.getCenterY(), (S32)(draw_rect.mRight - 5), (S32)draw_rect.getCenterY(), LLColor4::grey);
|
||||
return draw_rect.getWidth();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ void LLColorSwatchCtrl::onColorChanged ( void* data, EColorPickOp pick_op )
|
|||
subject->mColor.mV[VALPHA] ); // keep current alpha
|
||||
subject->mColor = updatedColor;
|
||||
subject->setControlValue(updatedColor.getValue());
|
||||
|
||||
pickerp->setRevertOnCancel(TRUE);
|
||||
if (pick_op == COLOR_CANCEL && subject->mOnCancelCallback)
|
||||
{
|
||||
subject->mOnCancelCallback( subject, LLSD());
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ public:
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect)
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect)
|
||||
{
|
||||
F32 right_x;
|
||||
mStyle->getFont()->renderUTF8(mExpanderLabel, start,
|
||||
|
|
|
|||
|
|
@ -1011,6 +1011,7 @@ BOOL LLFavoritesBarCtrl::collectFavoriteItems(LLInventoryModel::item_array_t &it
|
|||
{
|
||||
LLFavoritesOrderStorage::instance().setSortIndex((*i), ++sortField);
|
||||
}
|
||||
LLFavoritesOrderStorage::instance().mSaveOnExit = true;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
|
@ -1590,10 +1591,10 @@ void LLFavoritesOrderStorage::destroyClass()
|
|||
{
|
||||
file.close();
|
||||
LLFile::remove(filename);
|
||||
if(mSaveOnExit)
|
||||
{
|
||||
LLFavoritesOrderStorage::instance().saveFavoritesRecord(true);
|
||||
}
|
||||
}
|
||||
if(mSaveOnExit)
|
||||
{
|
||||
LLFavoritesOrderStorage::instance().saveFavoritesRecord(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -175,6 +175,7 @@ void LLFloaterColorPicker::showUI ()
|
|||
openFloater(getKey());
|
||||
setVisible ( TRUE );
|
||||
setFocus ( TRUE );
|
||||
setRevertOnCancel(FALSE);
|
||||
|
||||
// HACK: if system color picker is required - close the SL one we made and use default system dialog
|
||||
if ( gSavedSettings.getBOOL ( "UseDefaultColorPicker" ) )
|
||||
|
|
@ -402,7 +403,10 @@ void LLFloaterColorPicker::onClickCancel ( void* data )
|
|||
|
||||
if ( self )
|
||||
{
|
||||
self->cancelSelection ();
|
||||
if(self->getRevertOnCancel())
|
||||
{
|
||||
self->cancelSelection ();
|
||||
}
|
||||
self->closeFloater();
|
||||
}
|
||||
}
|
||||
|
|
@ -459,8 +463,7 @@ void LLFloaterColorPicker::onImmediateCheck( LLUICtrl* ctrl, void* data)
|
|||
if (self)
|
||||
{
|
||||
gSavedSettings.setBOOL("ApplyColorImmediately", self->mApplyImmediateCheck->get());
|
||||
|
||||
if (self->mApplyImmediateCheck->get())
|
||||
if (self->mApplyImmediateCheck->get() && self->isColorChanged())
|
||||
{
|
||||
LLColorSwatchCtrl::onColorChanged ( self->getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE );
|
||||
}
|
||||
|
|
@ -485,6 +488,11 @@ F32 LLFloaterColorPicker::getSwatchTransparency()
|
|||
return getTransparencyType() == TT_ACTIVE ? 1.f : LLFloater::getCurrentTransparency();
|
||||
}
|
||||
|
||||
BOOL LLFloaterColorPicker::isColorChanged()
|
||||
{
|
||||
return ((getOrigR() != getCurR()) || (getOrigG() != getCurG()) || (getOrigB() != getCurB()));
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLFloaterColorPicker::draw()
|
||||
|
|
|
|||
|
|
@ -104,6 +104,11 @@ class LLFloaterColorPicker
|
|||
void setMouseDownInSwatch (BOOL mouse_down_in_swatch);
|
||||
BOOL getMouseDownInSwatch () { return mMouseDownInSwatch; }
|
||||
|
||||
void setRevertOnCancel (BOOL revertOnCancel) { mRevertOnCancel = revertOnCancel; };
|
||||
BOOL getRevertOnCancel () { return mRevertOnCancel; }
|
||||
|
||||
BOOL isColorChanged ();
|
||||
|
||||
// called when text entries (RGB/HSL etc.) are changed by user
|
||||
void onTextEntryChanged ( LLUICtrl* ctrl );
|
||||
|
||||
|
|
@ -144,6 +149,8 @@ class LLFloaterColorPicker
|
|||
BOOL mMouseDownInHueRegion;
|
||||
BOOL mMouseDownInSwatch;
|
||||
|
||||
BOOL mRevertOnCancel;
|
||||
|
||||
const S32 mRGBViewerImageLeft;
|
||||
const S32 mRGBViewerImageTop;
|
||||
const S32 mRGBViewerImageWidth;
|
||||
|
|
|
|||
|
|
@ -667,7 +667,7 @@ void LLFloaterModelPreview::onAutoFillCommit(LLUICtrl* ctrl, void* userdata)
|
|||
{
|
||||
LLFloaterModelPreview* fp = (LLFloaterModelPreview*) userdata;
|
||||
|
||||
fp->mModelPreview->genLODs();
|
||||
fp->mModelPreview->queryLODs();
|
||||
}
|
||||
|
||||
void LLFloaterModelPreview::onLODParamCommit(S32 lod, bool enforce_tri_limit)
|
||||
|
|
@ -695,7 +695,12 @@ void LLFloaterModelPreview::onLODParamCommit(S32 lod, bool enforce_tri_limit)
|
|||
//-----------------------------------------------------------------------------
|
||||
void LLFloaterModelPreview::draw()
|
||||
{
|
||||
LLFloater::draw();
|
||||
LLFloater::draw();
|
||||
|
||||
if (!mModelPreview)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
mModelPreview->update();
|
||||
|
||||
|
|
@ -725,7 +730,7 @@ void LLFloaterModelPreview::draw()
|
|||
childSetTextArg("prim_cost", "[PRIM_COST]", llformat("%d", mModelPreview->mResourceCost));
|
||||
childSetTextArg("description_label", "[TEXTURES]", llformat("%d", mModelPreview->mTextureSet.size()));
|
||||
|
||||
if (mModelPreview)
|
||||
if (mModelPreview->lodsReady())
|
||||
{
|
||||
gGL.color3f(1.f, 1.f, 1.f);
|
||||
|
||||
|
|
@ -1235,6 +1240,7 @@ void LLFloaterModelPreview::onMouseCaptureLostModelPreview(LLMouseHandler* handl
|
|||
|
||||
LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp)
|
||||
: LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE), LLMutex(NULL)
|
||||
, mLodsQuery()
|
||||
, mPelvisZOffset( 0.0f )
|
||||
, mLegacyRigValid( false )
|
||||
, mRigValidJointUpload( false )
|
||||
|
|
@ -2680,112 +2686,6 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
|
|||
shader->bind();
|
||||
}
|
||||
}
|
||||
void LLModelPreview::genModelBBox()
|
||||
{
|
||||
LLVector3 min, max;
|
||||
min = this->mModelLoader->mExtents[0];
|
||||
max = this->mModelLoader->mExtents[1];
|
||||
std::vector<LLVector3> v_list;
|
||||
v_list.resize(4);
|
||||
std::map<U8, std::vector<LLVector3> > face_list;
|
||||
|
||||
// Face 0
|
||||
v_list[0] = LLVector3(min.mV[VX], max.mV[VY], max.mV[VZ]);
|
||||
v_list[1] = LLVector3(min.mV[VX], min.mV[VY], max.mV[VZ]);
|
||||
v_list[2] = LLVector3(max.mV[VX], min.mV[VY], max.mV[VZ]);
|
||||
v_list[3] = LLVector3(max.mV[VX], max.mV[VY], max.mV[VZ]);
|
||||
face_list.insert(std::pair<U8, std::vector<LLVector3> >(0, v_list));
|
||||
|
||||
// Face 1
|
||||
v_list[0] = LLVector3(max.mV[VX], min.mV[VY], max.mV[VZ]);
|
||||
v_list[1] = LLVector3(max.mV[VX], min.mV[VY], min.mV[VZ]);
|
||||
v_list[2] = LLVector3(max.mV[VX], max.mV[VY], min.mV[VZ]);
|
||||
v_list[3] = LLVector3(max.mV[VX], max.mV[VY], max.mV[VZ]);
|
||||
face_list.insert(std::pair<U8, std::vector<LLVector3> >(1, v_list));
|
||||
|
||||
// Face 2
|
||||
v_list[0] = LLVector3(min.mV[VX], max.mV[VY], min.mV[VZ]);
|
||||
v_list[1] = LLVector3(min.mV[VX], max.mV[VY], max.mV[VZ]);
|
||||
v_list[2] = LLVector3(max.mV[VX], max.mV[VY], max.mV[VZ]);
|
||||
v_list[3] = LLVector3(max.mV[VX], max.mV[VY], min.mV[VZ]);
|
||||
face_list.insert(std::pair<U8, std::vector<LLVector3> >(2, v_list));
|
||||
|
||||
// Face 3
|
||||
v_list[0] = LLVector3(min.mV[VX], max.mV[VY], max.mV[VZ]);
|
||||
v_list[1] = LLVector3(min.mV[VX], max.mV[VY], min.mV[VZ]);
|
||||
v_list[2] = LLVector3(min.mV[VX], min.mV[VY], min.mV[VZ]);
|
||||
v_list[3] = LLVector3(min.mV[VX], min.mV[VY], max.mV[VZ]);
|
||||
face_list.insert(std::pair<U8, std::vector<LLVector3> >(3, v_list));
|
||||
|
||||
// Face 4
|
||||
v_list[0] = LLVector3(min.mV[VX], min.mV[VY], max.mV[VZ]);
|
||||
v_list[1] = LLVector3(min.mV[VX], min.mV[VY], min.mV[VZ]);
|
||||
v_list[2] = LLVector3(max.mV[VX], min.mV[VY], min.mV[VZ]);
|
||||
v_list[3] = LLVector3(max.mV[VX], min.mV[VY], max.mV[VZ]);
|
||||
face_list.insert(std::pair<U8, std::vector<LLVector3> >(4, v_list));
|
||||
|
||||
// Face 5
|
||||
v_list[0] = LLVector3(min.mV[VX], min.mV[VY], min.mV[VZ]);
|
||||
v_list[1] = LLVector3(min.mV[VX], max.mV[VY], min.mV[VZ]);
|
||||
v_list[2] = LLVector3(max.mV[VX], max.mV[VY], min.mV[VZ]);
|
||||
v_list[3] = LLVector3(max.mV[VX], min.mV[VY], min.mV[VZ]);
|
||||
face_list.insert(std::pair<U8, std::vector<LLVector3> >(5, v_list));
|
||||
|
||||
U16 Idx[] = { 0, 1, 2, 3, 0, 2, };
|
||||
|
||||
U32 type_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0;
|
||||
LLPointer<LLVertexBuffer> buff = new LLVertexBuffer(type_mask, 0);
|
||||
buff->allocateBuffer(4, 6, true);
|
||||
|
||||
LLStrider<LLVector3> pos;
|
||||
LLStrider<U16> idx;
|
||||
LLStrider<LLVector3> norm;
|
||||
LLStrider<LLVector2> tc;
|
||||
|
||||
buff->getVertexStrider(pos);
|
||||
buff->getIndexStrider(idx);
|
||||
|
||||
buff->getNormalStrider(norm);
|
||||
buff->getTexCoord0Strider(tc);
|
||||
|
||||
for (U32 i = 0; i < 6; ++i)
|
||||
{
|
||||
idx[i] = Idx[i];
|
||||
}
|
||||
|
||||
LLVolumeParams volume_params;
|
||||
volume_params.setType(LL_PCODE_PROFILE_SQUARE, LL_PCODE_PATH_LINE);
|
||||
LLModel* mdl = new LLModel(volume_params, 0.f);
|
||||
mdl->mLabel = "BBOX"; // please adopt name from high LOD (mBaseModel) or from original model otherwise it breaks search mechanics which is name based
|
||||
|
||||
mdl->setNumVolumeFaces(6);
|
||||
for (U8 i = 0; i < 6; ++i)
|
||||
{
|
||||
for (U8 j = 0; j < 4; ++j)
|
||||
{
|
||||
pos[j] = face_list[i][j];
|
||||
}
|
||||
|
||||
mdl->setVolumeFaceData(i, pos, norm, tc, idx, buff->getNumVerts(), buff->getNumIndices());
|
||||
}
|
||||
|
||||
if (validate_model(mdl))
|
||||
{
|
||||
LLMatrix4 mat;
|
||||
std::map<std::string, LLImportMaterial> materials;
|
||||
std::vector<LLModelInstance> instance_list;
|
||||
instance_list.push_back(LLModelInstance(mdl, mdl->mLabel, mat, materials));
|
||||
|
||||
for (S32 i = LLModel::LOD_HIGH - 1; i >= 0; i--)
|
||||
{
|
||||
mModel[i].clear();
|
||||
mModel[i].push_back(mdl);
|
||||
|
||||
mScene[i].clear();
|
||||
mScene[i].insert(std::pair<LLMatrix4, std::vector<LLModelInstance> >(mat, instance_list));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLModelPreview::updateStatusMessages()
|
||||
{
|
||||
|
|
@ -3537,14 +3437,25 @@ void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights)
|
|||
void LLModelPreview::update()
|
||||
{
|
||||
if (mGenLOD)
|
||||
{
|
||||
mGenLOD = false;
|
||||
genLODs();
|
||||
refresh();
|
||||
updateStatusMessages();
|
||||
}
|
||||
{
|
||||
bool subscribe_for_generation = mLodsQuery.empty();
|
||||
mGenLOD = false;
|
||||
mDirty = true;
|
||||
mLodsQuery.clear();
|
||||
|
||||
if (mDirty)
|
||||
for (S32 lod = LLModel::LOD_HIGH; lod >= 0; --lod)
|
||||
{
|
||||
// adding all lods into query for generation
|
||||
mLodsQuery.push_back(lod);
|
||||
}
|
||||
|
||||
if (subscribe_for_generation)
|
||||
{
|
||||
doOnIdleRepeating(lodQueryCallback);
|
||||
}
|
||||
}
|
||||
|
||||
if (mDirty && mLodsQuery.empty())
|
||||
{
|
||||
mDirty = false;
|
||||
mResourceCost = calcResourceCost();
|
||||
|
|
@ -4494,6 +4405,29 @@ void LLModelPreview::textureLoadedCallback( BOOL success, LLViewerFetchedTexture
|
|||
}
|
||||
}
|
||||
|
||||
// static
|
||||
bool LLModelPreview::lodQueryCallback()
|
||||
{
|
||||
// not the best solution, but model preview belongs to floater
|
||||
// so it is an easy way to check that preview still exists.
|
||||
LLFloaterModelPreview* fmp = LLFloaterModelPreview::sInstance;
|
||||
if (fmp && fmp->mModelPreview)
|
||||
{
|
||||
LLModelPreview* preview = fmp->mModelPreview;
|
||||
if (preview->mLodsQuery.size() > 0)
|
||||
{
|
||||
S32 lod = preview->mLodsQuery.back();
|
||||
preview->mLodsQuery.pop_back();
|
||||
preview->genLODs(lod);
|
||||
|
||||
// return false to continue cycle
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// nothing to process
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLModelPreview::onLODParamCommit(S32 lod, bool enforce_tri_limit)
|
||||
{
|
||||
if (!mLODFrozen)
|
||||
|
|
|
|||
|
|
@ -264,8 +264,9 @@ public:
|
|||
void clearModel(S32 lod);
|
||||
void loadModel(std::string filename, S32 lod, bool force_disable_slm = false);
|
||||
void loadModelCallback(S32 lod);
|
||||
bool lodsReady() { return !mGenLOD && mLodsQuery.empty(); }
|
||||
void queryLODs() { mGenLOD = true; };
|
||||
void genLODs(S32 which_lod = -1, U32 decimation = 3, bool enforce_tri_limit = false);
|
||||
void genModelBBox(); // Generate just a model BBox if we can't generate proper LOD
|
||||
void generateNormals();
|
||||
void restoreNormals();
|
||||
U32 calcResourceCost();
|
||||
|
|
@ -293,6 +294,7 @@ public:
|
|||
void setLegacyRigValid( bool rigValid ) { mLegacyRigValid = rigValid; }
|
||||
|
||||
static void textureLoadedCallback( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata );
|
||||
static bool lodQueryCallback();
|
||||
|
||||
boost::signals2::connection setDetailsCallback( const details_signal_t::slot_type& cb ){ return mDetailsSignal.connect(cb); }
|
||||
boost::signals2::connection setModelLoadedCallback( const model_loaded_signal_t::slot_type& cb ){ return mModelLoadedSignal.connect(cb); }
|
||||
|
|
@ -306,6 +308,7 @@ public:
|
|||
LLVector3 getTranslationForJointOffset( std::string joint );
|
||||
|
||||
static bool sIgnoreLoadedCallback;
|
||||
std::vector<S32> mLodsQuery;
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
|||
|
|
@ -682,6 +682,10 @@ BOOL LLFloaterPreference::postBuild()
|
|||
|
||||
LLLogChat::setSaveHistorySignal(boost::bind(&LLFloaterPreference::onLogChatHistorySaved, this));
|
||||
|
||||
LLSliderCtrl* fov_slider = getChild<LLSliderCtrl>("camera_fov");
|
||||
fov_slider->setMinValue(LLViewerCamera::getInstance()->getMinView());
|
||||
fov_slider->setMaxValue(LLViewerCamera::getInstance()->getMaxView());
|
||||
|
||||
// [SL:KB] - Patch: Viewer-CrashReporting | Checked: 2011-06-11 (Catznip-2.6.c) | Added: Catznip-2.6.0c
|
||||
#ifndef LL_SEND_CRASH_REPORTS
|
||||
// Hide the crash report tab if crash reporting isn't enabled
|
||||
|
|
|
|||
|
|
@ -2227,6 +2227,8 @@ void LLPanelEstateInfo::updateControls(LLViewerRegion* region)
|
|||
BOOL manager = (region && region->isEstateManager());
|
||||
setCtrlsEnabled(god || owner || manager);
|
||||
|
||||
getChildView("apply_btn")->setEnabled(FALSE);
|
||||
|
||||
BOOL has_allowed_avatar = getChild<LLNameListCtrl>("allowed_avatar_name_list")->getFirstSelected() ? TRUE : FALSE;
|
||||
BOOL has_allowed_group = getChild<LLNameListCtrl>("allowed_group_name_list")->getFirstSelected() ? TRUE : FALSE;
|
||||
BOOL has_banned_agent = getChild<LLNameListCtrl>("banned_avatar_name_list")->getFirstSelected() ? TRUE : FALSE;
|
||||
|
|
|
|||
|
|
@ -162,6 +162,7 @@ void LLInitialFriendCardsFetch::done()
|
|||
|
||||
// LLFriendCardsManager Constructor / Destructor
|
||||
LLFriendCardsManager::LLFriendCardsManager()
|
||||
: mState(INIT)
|
||||
{
|
||||
LLAvatarTracker::instance().addObserver(this);
|
||||
}
|
||||
|
|
@ -423,6 +424,7 @@ void LLFriendCardsManager::ensureFriendsFolderExists()
|
|||
LLUUID friends_folder_ID = findFriendFolderUUIDImpl();
|
||||
if (friends_folder_ID.notNull())
|
||||
{
|
||||
mState = LOADING_FRIENDS_FOLDER;
|
||||
fetchAndCheckFolderDescendents(friends_folder_ID,
|
||||
boost::bind(&LLFriendCardsManager::ensureFriendsAllFolderExists, this));
|
||||
}
|
||||
|
|
@ -452,6 +454,7 @@ void LLFriendCardsManager::ensureFriendsAllFolderExists()
|
|||
LLUUID friends_all_folder_ID = findFriendAllSubfolderUUIDImpl();
|
||||
if (friends_all_folder_ID.notNull())
|
||||
{
|
||||
mState = LOADING_ALL_FOLDER;
|
||||
fetchAndCheckFolderDescendents(friends_all_folder_ID,
|
||||
boost::bind(&LLFriendCardsManager::syncFriendsFolder, this));
|
||||
}
|
||||
|
|
@ -506,6 +509,9 @@ void LLFriendCardsManager::syncFriendsFolder()
|
|||
NULL);
|
||||
}
|
||||
|
||||
// All folders created and updated.
|
||||
mState = MANAGER_READY;
|
||||
|
||||
// 2. Add missing Friend Cards for friends
|
||||
LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin();
|
||||
LL_INFOS() << "try to build friends, count: " << all_buddies.size() << LL_ENDL;
|
||||
|
|
@ -540,6 +546,12 @@ void LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID)
|
|||
<< ", id: " << avatarID
|
||||
<< LL_ENDL;
|
||||
|
||||
if (shouldBeAdded && !isManagerReady())
|
||||
{
|
||||
shouldBeAdded = false;
|
||||
LL_DEBUGS() << "Calling cards manager not ready, state: " << getManagerState() << LL_ENDL;
|
||||
}
|
||||
|
||||
if (shouldBeAdded && findFriendCardInventoryUUIDImpl(avatarID).notNull())
|
||||
{
|
||||
shouldBeAdded = false;
|
||||
|
|
@ -583,13 +595,30 @@ void LLFriendCardsManager::onFriendListUpdate(U32 changed_mask)
|
|||
switch(changed_mask) {
|
||||
case LLFriendObserver::ADD:
|
||||
{
|
||||
const std::set<LLUUID>& changed_items = at.getChangedIDs();
|
||||
std::set<LLUUID>::const_iterator id_it = changed_items.begin();
|
||||
std::set<LLUUID>::const_iterator id_end = changed_items.end();
|
||||
for (;id_it != id_end; ++id_it)
|
||||
{
|
||||
LLFriendCardsManager::instance().addFriendCardToInventory(*id_it);
|
||||
}
|
||||
LLFriendCardsManager& cards_manager = LLFriendCardsManager::instance();
|
||||
if (cards_manager.isManagerReady())
|
||||
{
|
||||
// Try to add cards into inventory.
|
||||
// If cards already exist they won't be created.
|
||||
const std::set<LLUUID>& changed_items = at.getChangedIDs();
|
||||
std::set<LLUUID>::const_iterator id_it = changed_items.begin();
|
||||
std::set<LLUUID>::const_iterator id_end = changed_items.end();
|
||||
for (; id_it != id_end; ++id_it)
|
||||
{
|
||||
cards_manager.addFriendCardToInventory(*id_it);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// User either removed calling cards' folders and manager is loading them
|
||||
// or update came too early, before viewer had chance to load all folders.
|
||||
// Either way don't process 'add' operation - manager will recreate all
|
||||
// cards after fetching folders.
|
||||
LL_INFOS_ONCE() << "Calling cards manager not ready, state: "
|
||||
<< cards_manager.getManagerState()
|
||||
<< ", postponing update."
|
||||
<< LL_ENDL;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LLFriendObserver::REMOVE:
|
||||
|
|
|
|||
|
|
@ -45,6 +45,14 @@ class LLFriendCardsManager
|
|||
public:
|
||||
typedef std::map<LLUUID, uuid_vec_t > folderid_buddies_map_t;
|
||||
|
||||
enum EManagerState
|
||||
{
|
||||
INIT = 1,
|
||||
LOADING_FRIENDS_FOLDER,
|
||||
LOADING_ALL_FOLDER,
|
||||
MANAGER_READY
|
||||
};
|
||||
|
||||
// LLFriendObserver implementation
|
||||
void changed(U32 mask)
|
||||
{
|
||||
|
|
@ -71,7 +79,14 @@ public:
|
|||
/**
|
||||
* Checks is the specified category is a Friend folder or any its subfolder
|
||||
*/
|
||||
bool isAnyFriendCategory(const LLUUID& catID) const;
|
||||
bool isAnyFriendCategory(const LLUUID& catID) const;
|
||||
|
||||
/**
|
||||
* Indicates that all calling card related folders are created or loaded
|
||||
*/
|
||||
bool isManagerReady() const { return mState == MANAGER_READY; }
|
||||
|
||||
EManagerState getManagerState() const { return mState; }
|
||||
|
||||
/**
|
||||
* Checks whether "Friends" and "Friends/All" folders exist in "Calling Cards" category
|
||||
|
|
@ -149,6 +164,8 @@ private:
|
|||
typedef std::set<LLUUID> avatar_uuid_set_t;
|
||||
|
||||
avatar_uuid_set_t mBuddyIDSet;
|
||||
EManagerState mState;
|
||||
|
||||
};
|
||||
|
||||
#endif // LL_LLFRIENDCARD_H
|
||||
|
|
|
|||
|
|
@ -145,8 +145,10 @@ bool LLGiveInventory::isInventoryGiveAcceptable(const LLInventoryItem* item)
|
|||
BOOL copyable = false;
|
||||
if (item->getPermissions().allowCopyBy(gAgentID)) copyable = true;
|
||||
|
||||
if (!copyable || get_is_item_worn(item->getUUID()))
|
||||
if (!copyable && get_is_item_worn(item->getUUID()))
|
||||
{
|
||||
// worn no-copy items can't be transfered,
|
||||
// but it is valid to transfer a copy of a worn item
|
||||
acceptable = false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,10 @@ LLGroupIconCtrl::Params::Params()
|
|||
: group_id("group_id"),
|
||||
draw_tooltip("draw_tooltip", true),
|
||||
default_icon_name("default_icon_name")
|
||||
{}
|
||||
{
|
||||
changeDefault(min_width, 32);
|
||||
changeDefault(min_height, 32);
|
||||
}
|
||||
|
||||
|
||||
LLGroupIconCtrl::LLGroupIconCtrl(const LLGroupIconCtrl::Params& p)
|
||||
|
|
@ -48,6 +51,12 @@ LLGroupIconCtrl::LLGroupIconCtrl(const LLGroupIconCtrl::Params& p)
|
|||
{
|
||||
mPriority = LLViewerFetchedTexture::BOOST_ICON;
|
||||
|
||||
// don't request larger image then necessary to save gl memory,
|
||||
// but ensure that quality is sufficient
|
||||
LLRect rect = p.rect;
|
||||
mMaxHeight = llmax((S32)p.min_height, rect.getHeight());
|
||||
mMaxWidth = llmax((S32)p.min_width, rect.getWidth());
|
||||
|
||||
if (p.group_id.isProvided())
|
||||
{
|
||||
LLSD value(p.group_id);
|
||||
|
|
|
|||
|
|
@ -1068,6 +1068,11 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
|
|||
void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data)
|
||||
{
|
||||
LL_DEBUGS() << "LLGroupMgr::processGroupPropertiesReply" << LL_ENDL;
|
||||
if (!msg)
|
||||
{
|
||||
LL_ERRS() << "Can't access the messaging system" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
LLUUID agent_id;
|
||||
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
|
||||
if (gAgent.getID() != agent_id)
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ const F32 VERTICAL_PADDING = 12.f;
|
|||
const F32 BUFFER_SIZE = 2.f;
|
||||
const F32 HUD_TEXT_MAX_WIDTH = 190.f;
|
||||
const F32 HUD_TEXT_MAX_WIDTH_NO_BUBBLE = 1000.f;
|
||||
const F32 MAX_DRAW_DISTANCE = 64.f;
|
||||
|
||||
std::set<LLPointer<LLHUDText> > LLHUDText::sTextObjects;
|
||||
std::vector<LLPointer<LLHUDText> > LLHUDText::sVisibleTextObjects;
|
||||
|
|
@ -423,8 +424,8 @@ void LLHUDText::updateVisibility()
|
|||
}
|
||||
|
||||
mLastDistance = (mPositionAgent - LLViewerCamera::getInstance()->getOrigin()).magVec();
|
||||
|
||||
if (!mTextSegments.size() || (mDoFade && (mLastDistance > mFadeDistance + mFadeRange)))
|
||||
F32 obj_dist = dist_vec(mSourceObject->getPosition(), LLViewerCamera::getInstance()->getOrigin());
|
||||
if (!mTextSegments.size() || (mDoFade && (mLastDistance > mFadeDistance + mFadeRange)) || (obj_dist > MAX_DRAW_DISTANCE))
|
||||
{
|
||||
mVisible = FALSE;
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -42,16 +42,13 @@
|
|||
#include "lltrans.h"
|
||||
#include "lluictrl.h"
|
||||
|
||||
class LLFetchGroupData;
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// LLInspectGroup
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/// Group Inspector, a small information window used when clicking
|
||||
/// on group names in the 2D UI
|
||||
class LLInspectGroup : public LLInspect
|
||||
class LLInspectGroup : public LLInspect, public LLGroupMgrObserver
|
||||
{
|
||||
friend class LLFloaterReg;
|
||||
|
||||
|
|
@ -65,12 +62,16 @@ public:
|
|||
// (for example, inspector about same group but in different position)
|
||||
/*virtual*/ void onOpen(const LLSD& group_id);
|
||||
|
||||
void setGroupID(const LLUUID& group_id);
|
||||
|
||||
// When closing they should close their gear menu
|
||||
/*virtual*/ void onClose(bool app_quitting);
|
||||
|
||||
// Update view based on information from group manager
|
||||
void processGroupData();
|
||||
|
||||
|
||||
virtual void changed(LLGroupChange gc);
|
||||
|
||||
// Make network requests for all the data to display in this view.
|
||||
// Used on construction and if avatar id changes.
|
||||
void requestUpdate();
|
||||
|
|
@ -88,53 +89,12 @@ public:
|
|||
|
||||
private:
|
||||
LLUUID mGroupID;
|
||||
// an in-flight network request for group properties
|
||||
// is represented by this object
|
||||
LLFetchGroupData* mPropertiesRequest;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// LLFetchGroupData
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This object represents a pending request for avatar properties information
|
||||
class LLFetchGroupData : public LLGroupMgrObserver
|
||||
{
|
||||
public:
|
||||
// If the inspector closes it will delete the pending request object, so the
|
||||
// inspector pointer will be valid for the lifetime of this object
|
||||
LLFetchGroupData(const LLUUID& group_id, LLInspectGroup* inspector)
|
||||
: LLGroupMgrObserver(group_id),
|
||||
mInspector(inspector)
|
||||
{
|
||||
LLGroupMgr* mgr = LLGroupMgr::getInstance();
|
||||
// register ourselves as an observer
|
||||
mgr->addObserver(this);
|
||||
// send a request
|
||||
mgr->sendGroupPropertiesRequest(group_id);
|
||||
}
|
||||
|
||||
~LLFetchGroupData()
|
||||
{
|
||||
// remove ourselves as an observer
|
||||
LLGroupMgr::getInstance()->removeObserver(this);
|
||||
}
|
||||
|
||||
void changed(LLGroupChange gc)
|
||||
{
|
||||
if (gc == GC_PROPERTIES)
|
||||
{
|
||||
mInspector->processGroupData();
|
||||
}
|
||||
}
|
||||
|
||||
LLInspectGroup* mInspector;
|
||||
};
|
||||
|
||||
LLInspectGroup::LLInspectGroup(const LLSD& sd)
|
||||
: LLInspect( LLSD() ), // single_instance, doesn't really need key
|
||||
mGroupID(), // set in onOpen()
|
||||
mPropertiesRequest(NULL)
|
||||
mGroupID() // set in onOpen()
|
||||
{
|
||||
mCommitCallbackRegistrar.add("InspectGroup.ViewProfile",
|
||||
boost::bind(&LLInspectGroup::onClickViewProfile, this));
|
||||
|
|
@ -149,10 +109,7 @@ LLInspectGroup::LLInspectGroup(const LLSD& sd)
|
|||
|
||||
LLInspectGroup::~LLInspectGroup()
|
||||
{
|
||||
// clean up any pending requests so they don't call back into a deleted
|
||||
// view
|
||||
delete mPropertiesRequest;
|
||||
mPropertiesRequest = NULL;
|
||||
LLGroupMgr::getInstance()->removeObserver(this);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -164,7 +121,7 @@ void LLInspectGroup::onOpen(const LLSD& data)
|
|||
// start fade animation
|
||||
LLInspect::onOpen(data);
|
||||
|
||||
mGroupID = data["group_id"];
|
||||
setGroupID(data["group_id"]);
|
||||
|
||||
// Position the inspector relative to the mouse cursor
|
||||
// Similar to how tooltips are positioned
|
||||
|
|
@ -185,7 +142,8 @@ void LLInspectGroup::onOpen(const LLSD& data)
|
|||
// virtual
|
||||
void LLInspectGroup::onClose(bool app_quitting)
|
||||
{
|
||||
// *TODO: If we add a gear menu, close it here
|
||||
LLGroupMgr::getInstance()->removeObserver(this);
|
||||
// *TODO: If we add a gear menu, close it here
|
||||
}
|
||||
|
||||
void LLInspectGroup::requestUpdate()
|
||||
|
|
@ -213,9 +171,15 @@ void LLInspectGroup::requestUpdate()
|
|||
getChild<LLUICtrl>("leave_btn")->setVisible(false);
|
||||
getChild<LLUICtrl>("join_btn")->setVisible(false);
|
||||
|
||||
// Make a new request for properties
|
||||
delete mPropertiesRequest;
|
||||
mPropertiesRequest = new LLFetchGroupData(mGroupID, this);
|
||||
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
|
||||
if (!gdatap || !gdatap->isGroupPropertiesDataComplete() )
|
||||
{
|
||||
LLGroupMgr::getInstance()->sendGroupPropertiesRequest(mGroupID);
|
||||
}
|
||||
else
|
||||
{
|
||||
processGroupData();
|
||||
}
|
||||
|
||||
// Name lookup will be faster out of cache, use that
|
||||
gCacheName->getGroup(mGroupID,
|
||||
|
|
@ -223,6 +187,16 @@ void LLInspectGroup::requestUpdate()
|
|||
this, _1, _2, _3));
|
||||
}
|
||||
|
||||
void LLInspectGroup::setGroupID(const LLUUID& group_id)
|
||||
{
|
||||
LLGroupMgr::getInstance()->removeObserver(this);
|
||||
|
||||
mID = group_id;
|
||||
mGroupID = group_id;
|
||||
|
||||
LLGroupMgr::getInstance()->addObserver(this);
|
||||
}
|
||||
|
||||
void LLInspectGroup::nameUpdatedCallback(
|
||||
const LLUUID& id,
|
||||
const std::string& name,
|
||||
|
|
@ -236,6 +210,14 @@ void LLInspectGroup::nameUpdatedCallback(
|
|||
// Otherwise possibly a request for an older inspector, ignore it
|
||||
}
|
||||
|
||||
void LLInspectGroup::changed(LLGroupChange gc)
|
||||
{
|
||||
if (gc == GC_PROPERTIES)
|
||||
{
|
||||
processGroupData();
|
||||
}
|
||||
}
|
||||
|
||||
void LLInspectGroup::processGroupData()
|
||||
{
|
||||
LLGroupMgrGroupData* data =
|
||||
|
|
@ -288,10 +270,6 @@ void LLInspectGroup::processGroupData()
|
|||
bool can_join = !is_member && data->mOpenEnrollment;
|
||||
getChild<LLUICtrl>("join_btn")->setEnabled(can_join);
|
||||
}
|
||||
|
||||
// Delete the request object as it has been satisfied
|
||||
delete mPropertiesRequest;
|
||||
mPropertiesRequest = NULL;
|
||||
}
|
||||
|
||||
void LLInspectGroup::onClickViewProfile()
|
||||
|
|
|
|||
|
|
@ -1191,7 +1191,7 @@ void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat, U32
|
|||
else
|
||||
{
|
||||
// add this category
|
||||
LLPointer<LLViewerInventoryCategory> new_cat = new LLViewerInventoryCategory(cat->getParentUUID());
|
||||
LLPointer<LLViewerInventoryCategory> new_cat = new LLViewerInventoryCategory(cat->getOwnerID());
|
||||
new_cat->copyViewerCategory(cat);
|
||||
addCategory(new_cat);
|
||||
|
||||
|
|
|
|||
|
|
@ -501,27 +501,22 @@ void LLPanelGroupInvite::addUsers(uuid_vec_t& agent_ids)
|
|||
}
|
||||
else
|
||||
{
|
||||
//looks like user try to invite offline friend
|
||||
//looks like user try to invite offline avatar (or the avatar from the other region)
|
||||
//for offline avatar_id gObjectList.findObject() will return null
|
||||
//so we need to do this additional search in avatar tracker, see EXT-4732
|
||||
// <FS:Ansariel> FIRE-4140: Group invite button on profile sometimes doesn't work
|
||||
//if (LLAvatarTracker::instance().isBuddy(agent_id))
|
||||
// </FS:Ansariel>
|
||||
LLAvatarName av_name;
|
||||
if (!LLAvatarNameCache::get(agent_id, &av_name))
|
||||
{
|
||||
LLAvatarName av_name;
|
||||
if (!LLAvatarNameCache::get(agent_id, &av_name))
|
||||
{
|
||||
// actually it should happen, just in case
|
||||
//LLAvatarNameCache::get(LLUUID(agent_id), boost::bind(&LLPanelGroupInvite::addUserCallback, this, _1, _2));
|
||||
// for this special case!
|
||||
//when there is no cached name we should remove resident from agent_ids list to avoid breaking of sequence
|
||||
// removed id will be added in callback
|
||||
agent_ids.erase(agent_ids.begin() + i);
|
||||
}
|
||||
else
|
||||
{
|
||||
names.push_back(av_name.getAccountName());
|
||||
}
|
||||
// actually it should happen, just in case
|
||||
//LLAvatarNameCache::get(LLUUID(agent_id), boost::bind(&LLPanelGroupInvite::addUserCallback, this, _1, _2));
|
||||
// for this special case!
|
||||
//when there is no cached name we should remove resident from agent_ids list to avoid breaking of sequence
|
||||
// removed id will be added in callback
|
||||
agent_ids.erase(agent_ids.begin() + i);
|
||||
}
|
||||
else
|
||||
{
|
||||
names.push_back(av_name.getAccountName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -860,12 +860,17 @@ void LLPanelLogin::onClickConnect(void *)
|
|||
// The start location SLURL has already been sent to LLStartUp::setStartSLURL
|
||||
|
||||
std::string username = sInstance->getChild<LLUICtrl>("username_combo")->getValue().asString();
|
||||
std::string password = sInstance->getChild<LLUICtrl>("password_edit")->getValue().asString();
|
||||
|
||||
if(username.empty())
|
||||
{
|
||||
// user must type in something into the username field
|
||||
LLNotificationsUtil::add("MustHaveAccountToLogIn");
|
||||
}
|
||||
else if(password.empty())
|
||||
{
|
||||
LLNotificationsUtil::add("MustEnterPasswordToLogIn");
|
||||
}
|
||||
else
|
||||
{
|
||||
LLPointer<LLCredential> cred;
|
||||
|
|
|
|||
|
|
@ -857,7 +857,7 @@ void LLPanelOutfitEdit::onShopButtonClicked()
|
|||
url = url_resolver.resolveURL(LLWearableType::WT_NONE, SEX_FEMALE);
|
||||
}
|
||||
|
||||
LLWeb::loadURLExternal(url);
|
||||
LLWeb::loadURL(url);
|
||||
}
|
||||
|
||||
LLWearableType::EType LLPanelOutfitEdit::getCOFWearablesSelectionType() const
|
||||
|
|
|
|||
|
|
@ -694,24 +694,49 @@ void LLPanelPermissions::refresh()
|
|||
U32 next_owner_mask_on = 0;
|
||||
U32 next_owner_mask_off = 0;
|
||||
|
||||
BOOL valid_base_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_BASE,
|
||||
BOOL valid_base_perms = FALSE;
|
||||
BOOL valid_group_perms= FALSE;
|
||||
BOOL valid_everyone_perms= FALSE;
|
||||
BOOL valid_next_perms= FALSE;
|
||||
|
||||
if(root_selected)
|
||||
{
|
||||
valid_base_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_BASE,
|
||||
&base_mask_on,
|
||||
&base_mask_off);
|
||||
//BOOL valid_owner_perms =//
|
||||
LLSelectMgr::getInstance()->selectGetPerm(PERM_OWNER,
|
||||
//BOOL valid_owner_perms =//
|
||||
LLSelectMgr::getInstance()->selectGetPerm(PERM_OWNER,
|
||||
&owner_mask_on,
|
||||
&owner_mask_off);
|
||||
BOOL valid_group_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_GROUP,
|
||||
valid_group_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_GROUP,
|
||||
&group_mask_on,
|
||||
&group_mask_off);
|
||||
|
||||
BOOL valid_everyone_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_EVERYONE,
|
||||
valid_everyone_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_EVERYONE,
|
||||
&everyone_mask_on,
|
||||
&everyone_mask_off);
|
||||
|
||||
BOOL valid_next_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_NEXT_OWNER,
|
||||
valid_next_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_NEXT_OWNER,
|
||||
&next_owner_mask_on,
|
||||
&next_owner_mask_off);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(object_count == 1)
|
||||
{
|
||||
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstNode();
|
||||
if (node && node->mValid)
|
||||
{
|
||||
valid_base_perms = TRUE;
|
||||
|
||||
base_mask_on = node->mPermissions->getMaskBase();
|
||||
owner_mask_on = node->mPermissions->getMaskOwner();
|
||||
group_mask_on = node->mPermissions->getMaskGroup();
|
||||
everyone_mask_on = node->mPermissions->getMaskEveryone();
|
||||
next_owner_mask_on = node->mPermissions->getMaskNextOwner();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (gSavedSettings.getBOOL("DebugPermissions") )
|
||||
|
|
@ -733,6 +758,14 @@ void LLPanelPermissions::refresh()
|
|||
getChild<LLUICtrl>("N:")->setValue("N: " + mask_to_string(next_owner_mask_on));
|
||||
getChildView("N:")->setVisible( TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
getChildView("B:")->setVisible(FALSE);
|
||||
getChildView("O:")->setVisible(FALSE);
|
||||
getChildView("G:")->setVisible(FALSE);
|
||||
getChildView("E:")->setVisible(FALSE);
|
||||
getChildView("N:")->setVisible(FALSE);
|
||||
}
|
||||
|
||||
U32 flag_mask = 0x0;
|
||||
if (objectp->permMove()) flag_mask |= PERM_MOVE;
|
||||
|
|
|
|||
|
|
@ -314,21 +314,14 @@ void LLPanelPrimMediaControls::updateShape()
|
|||
|
||||
if (objectp)
|
||||
{
|
||||
// <FS:ND> VWR-29449; Remeber if user has MEDIA_PERM_CONTROL
|
||||
bool hasPermsControl = true;
|
||||
// </FS:ND>
|
||||
|
||||
bool mini_controls = false;
|
||||
LLMediaEntry *media_data = objectp->getTE(mTargetObjectFace)->getMediaData();
|
||||
if (media_data && NULL != dynamic_cast<LLVOVolume*>(objectp))
|
||||
{
|
||||
// Don't show the media controls if we do not have permissions
|
||||
enabled = dynamic_cast<LLVOVolume*>(objectp)->hasMediaPermission(media_data, LLVOVolume::MEDIA_PERM_CONTROL);
|
||||
|
||||
// <FS:ND> VWR-29449; Remeber if user has MEDIA_PERM_CONTROL
|
||||
hasPermsControl = dynamic_cast<LLVOVolume*>(objectp)->hasMediaPermission(media_data, LLVOVolume::MEDIA_PERM_CONTROL);
|
||||
// </FS:ND>
|
||||
|
||||
mini_controls = (LLMediaEntry::MINI == media_data->getControls());
|
||||
}
|
||||
const bool is_hud = objectp->isHUDAttachment();
|
||||
|
|
@ -571,10 +564,9 @@ void LLPanelPrimMediaControls::updateShape()
|
|||
}
|
||||
}
|
||||
|
||||
// <FS:ND> VWR-29449; If this is a HUD always set it visible, but hide each control if user has no perms.
|
||||
// When setting it invisible it won't receive any mouse messages anymore, thus eg trying to sroll a webpage with mousewheel has surprising effects.
|
||||
// MAINT-1392 If this is a HUD always set it visible, but hide each control if user has no perms.
|
||||
// When setting it invisible it won't receive any mouse messages anymore
|
||||
|
||||
// setVisible(enabled);
|
||||
if( !is_hud )
|
||||
setVisible(enabled);
|
||||
else
|
||||
|
|
@ -806,20 +798,15 @@ void LLPanelPrimMediaControls::draw()
|
|||
controls_bg_area.mRight -= mRightBookend->getRect().getWidth() - space - 2;
|
||||
|
||||
// draw control background UI image
|
||||
|
||||
// <FS:ND> VWR-29449; Only draw mBackgroundImage when the user has MEDIA_PERM_CONTROL. Otherwise we did hide all media controls above and drawing mBackgroundImage draws a useless grey square.
|
||||
|
||||
// mBackgroundImage->draw( controls_bg_area, UI_VERTEX_COLOR % alpha);
|
||||
|
||||
LLViewerObject* objectp = getTargetObject();
|
||||
LLMediaEntry *media_data(0);
|
||||
|
||||
if( objectp )
|
||||
media_data = objectp->getTE(mTargetObjectFace)->getMediaData();
|
||||
|
||||
if( !dynamic_cast<LLVOVolume*>(objectp) || !media_data || dynamic_cast<LLVOVolume*>(objectp)->hasMediaPermission(media_data, LLVOVolume::MEDIA_PERM_CONTROL) )
|
||||
mBackgroundImage->draw( controls_bg_area, UI_VERTEX_COLOR % alpha);
|
||||
|
||||
// </FS:ND>
|
||||
|
||||
// draw volume slider background UI image
|
||||
if (mVolumeSliderCtrl->getVisible())
|
||||
|
|
|
|||
|
|
@ -719,7 +719,7 @@ void LLPanelVolume::onLightCancelTexture(const LLSD& data)
|
|||
|
||||
if (LightTextureCtrl)
|
||||
{
|
||||
LightTextureCtrl->setImageAssetID(LLUUID::null);
|
||||
LightTextureCtrl->setImageAssetID(mLightSavedTexture);
|
||||
}
|
||||
|
||||
LLVOVolume *volobjp = (LLVOVolume *) mObject.get();
|
||||
|
|
@ -728,7 +728,16 @@ void LLPanelVolume::onLightCancelTexture(const LLSD& data)
|
|||
// Cancel the light texture as requested
|
||||
// NORSPEC-292
|
||||
//
|
||||
volobjp->setLightTextureID(LLUUID::null);
|
||||
bool is_spotlight = volobjp->isLightSpotlight();
|
||||
volobjp->setLightTextureID(mLightSavedTexture); //updates spotlight
|
||||
|
||||
if (!is_spotlight && mLightSavedTexture.notNull())
|
||||
{
|
||||
LLVector3 spot_params = volobjp->getSpotLightParams();
|
||||
getChild<LLUICtrl>("Light FOV")->setValue(spot_params.mV[0]);
|
||||
getChild<LLUICtrl>("Light Focus")->setValue(spot_params.mV[1]);
|
||||
getChild<LLUICtrl>("Light Ambiance")->setValue(spot_params.mV[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -827,7 +836,12 @@ void LLPanelVolume::onCommitLight( LLUICtrl* ctrl, void* userdata )
|
|||
self->getChild<LLUICtrl>("Light Ambiance")->setValue(spot_params.mV[2]);
|
||||
}
|
||||
else
|
||||
{ //modifying existing params
|
||||
{ //modifying existing params, this time volobjp won't change params on its own.
|
||||
if (volobjp->getLightTextureID() != id)
|
||||
{
|
||||
volobjp->setLightTextureID(id);
|
||||
}
|
||||
|
||||
LLVector3 spot_params;
|
||||
spot_params.mV[0] = (F32) self->getChild<LLUICtrl>("Light FOV")->getValue().asReal();
|
||||
spot_params.mV[1] = (F32) self->getChild<LLUICtrl>("Light Focus")->getValue().asReal();
|
||||
|
|
|
|||
|
|
@ -2493,7 +2493,8 @@ LLLiveLSLEditor::LLLiveLSLEditor(const LLSD& key) :
|
|||
mCloseAfterSave(FALSE),
|
||||
mPendingUploads(0),
|
||||
mIsModifiable(FALSE),
|
||||
mIsNew(false)
|
||||
mIsNew(false),
|
||||
mIsSaving(FALSE)
|
||||
{
|
||||
mFactoryMap["script ed panel"] = LLCallbackMap(LLLiveLSLEditor::createScriptEdPanel, this);
|
||||
}
|
||||
|
|
@ -2550,6 +2551,8 @@ void LLLiveLSLEditor::callbackLSLCompileSucceeded(const LLUUID& task_id,
|
|||
}
|
||||
// [/SL:KB]
|
||||
|
||||
getChild<LLCheckBoxCtrl>("running")->set(is_script_running);
|
||||
mIsSaving = FALSE;
|
||||
closeIfNeeded();
|
||||
}
|
||||
|
||||
|
|
@ -2582,6 +2585,7 @@ void LLLiveLSLEditor::callbackLSLCompileFailed(const LLSD& compile_errors)
|
|||
}
|
||||
// [/SL:KB]
|
||||
|
||||
mIsSaving = FALSE;
|
||||
closeIfNeeded();
|
||||
}
|
||||
|
||||
|
|
@ -2840,13 +2844,13 @@ void LLLiveLSLEditor::draw()
|
|||
if(object->permAnyOwner())
|
||||
{
|
||||
runningCheckbox->setLabel(getString("script_running"));
|
||||
runningCheckbox->setEnabled(TRUE);
|
||||
runningCheckbox->setEnabled(!mIsSaving);
|
||||
|
||||
// <FS:Ansariel> Rev 496 LL merge error
|
||||
//if(object->permAnyOwner())
|
||||
//{
|
||||
// runningCheckbox->setLabel(getString("script_running"));
|
||||
// runningCheckbox->setEnabled(TRUE);
|
||||
// runningCheckbox->setEnabled(!mIsSaving);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
|
|
@ -2995,6 +2999,7 @@ void LLLiveLSLEditor::saveIfNeeded(bool sync /*= true*/)
|
|||
getWindow()->incBusyCount();
|
||||
mPendingUploads++;
|
||||
BOOL is_running = getChild<LLCheckBoxCtrl>( "running")->get();
|
||||
mIsSaving = TRUE;
|
||||
if (!url.empty())
|
||||
{
|
||||
uploadAssetViaCaps(url, filename, mObjectUUID, mItemUUID, is_running, mScriptEd->getAssociatedExperience());
|
||||
|
|
|
|||
|
|
@ -412,6 +412,8 @@ private:
|
|||
// need to save both text and script, so need to decide when done
|
||||
S32 mPendingUploads;
|
||||
|
||||
BOOL mIsSaving;
|
||||
|
||||
BOOL getIsModifiable() const { return mIsModifiable; } // Evaluated on load assert
|
||||
|
||||
LLCheckBoxCtrl* mMonoCheckbox;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
#include "llviewerwindow.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "lltrans.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "lldockablefloater.h"
|
||||
#include "llsyswellwindow.h"
|
||||
#include "llfloaterimsession.h"
|
||||
|
|
@ -306,7 +306,11 @@ void LLScreenChannel::addToast(const LLToast::Params& p)
|
|||
|
||||
if(!show_toast && !store_toast)
|
||||
{
|
||||
LLNotificationPtr notification = LLNotifications::instance().find(p.notif_id);
|
||||
if(gAgent.isDoNotDisturb())
|
||||
{
|
||||
return;
|
||||
}
|
||||
LLNotificationPtr notification = LLNotifications::instance().find(p.notif_id);
|
||||
|
||||
if (notification &&
|
||||
(!notification->canLogToIM() || !notification->hasFormElements()))
|
||||
|
|
|
|||
|
|
@ -1705,7 +1705,11 @@ void LLSelectMgr::selectionSetImage(const LLUUID& imageid)
|
|||
f(LLViewerInventoryItem* item, const LLUUID& id) : mItem(item), mImageID(id) {}
|
||||
bool apply(LLViewerObject* objectp, S32 te)
|
||||
{
|
||||
if (mItem)
|
||||
if(objectp && !objectp->permModify())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (mItem)
|
||||
{
|
||||
if (te == -1) // all faces
|
||||
{
|
||||
|
|
@ -6962,7 +6966,8 @@ LLBBox LLSelectMgr::getBBoxOfSelection() const
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLSelectMgr::canUndo() const
|
||||
{
|
||||
return const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstEditableObject() != NULL; // HACK: casting away constness - MG
|
||||
// Can edit or can move
|
||||
return const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstUndoEnabledObject() != NULL; // HACK: casting away constness - MG;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -7951,6 +7956,22 @@ LLViewerObject* LLObjectSelection::getFirstMoveableObject(BOOL get_parent)
|
|||
return getFirstSelectedObject(&func, get_parent);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// getFirstUndoEnabledObject()
|
||||
//-----------------------------------------------------------------------------
|
||||
LLViewerObject* LLObjectSelection::getFirstUndoEnabledObject(BOOL get_parent)
|
||||
{
|
||||
struct f : public LLSelectedNodeFunctor
|
||||
{
|
||||
bool apply(LLSelectNode* node)
|
||||
{
|
||||
LLViewerObject* obj = node->getObject();
|
||||
return obj && (obj->permModify() || (obj->permMove() && !obj->isPermanentEnforced()));
|
||||
}
|
||||
} func;
|
||||
return getFirstSelectedObject(&func, get_parent);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Position + Rotation update methods called from LLViewerJoystick
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -319,6 +319,7 @@ public:
|
|||
LLViewerObject* getFirstCopyableObject(BOOL get_parent = FALSE);
|
||||
LLViewerObject* getFirstDeleteableObject();
|
||||
LLViewerObject* getFirstMoveableObject(BOOL get_parent = FALSE);
|
||||
LLViewerObject* getFirstUndoEnabledObject(BOOL get_parent = FALSE);
|
||||
|
||||
/// Return the object that lead to this selection, possible a child
|
||||
LLViewerObject* getPrimaryObject() { return mPrimaryObject; }
|
||||
|
|
|
|||
|
|
@ -386,6 +386,10 @@ void LLSidepanelTaskInfo::refresh()
|
|||
// mDACreatorName->setValue(creator_name);
|
||||
// mCreatorID = creator_id;
|
||||
// }
|
||||
// if(mDACreatorName->getValue().asString() == LLStringUtil::null)
|
||||
// {
|
||||
// mDACreatorName->setValue(creator_name);
|
||||
// }
|
||||
// mDACreatorName->setEnabled(TRUE);
|
||||
// [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row
|
||||
|
||||
|
|
@ -426,6 +430,10 @@ void LLSidepanelTaskInfo::refresh()
|
|||
// mDAOwnerName->setValue(owner_name);
|
||||
// mOwnerID = owner_id;
|
||||
// }
|
||||
// if(mDAOwnerName->getValue().asString() == LLStringUtil::null)
|
||||
// {
|
||||
// mDAOwnerName->setValue(owner_name);
|
||||
// }
|
||||
// [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ BOOL LLStatusBar::postBuild()
|
|||
boost::bind(&LLStatusBar::onClickBuyCurrency, this));
|
||||
|
||||
// <FS:Ansariel> Not used in Firestorm
|
||||
//getChild<LLUICtrl>("goShop")->setCommitCallback(boost::bind(&LLWeb::loadURLExternal, gSavedSettings.getString("MarketplaceURL")));
|
||||
//getChild<LLUICtrl>("goShop")->setCommitCallback(boost::bind(&LLWeb::loadURL, gSavedSettings.getString("MarketplaceURL"), LLStringUtil::null, LLStringUtil::null));
|
||||
|
||||
mBoxBalance = getChild<LLTextBox>("balance");
|
||||
mBoxBalance->setClickedCallback( &LLStatusBar::onClickBalance, this );
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
#include "lltoolfocus.h"
|
||||
#include "llfocusmgr.h"
|
||||
#include "llagent.h"
|
||||
#include "llagentcamera.h"
|
||||
#include "llviewerjoystick.h"
|
||||
|
||||
extern BOOL gDebugClicks;
|
||||
|
|
@ -84,7 +85,14 @@ BOOL LLTool::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
}
|
||||
// by default, didn't handle it
|
||||
// LL_INFOS() << "LLTool::handleMouseDown" << LL_ENDL;
|
||||
gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_DOWN);
|
||||
if (gAgentCamera.cameraMouselook())
|
||||
{
|
||||
gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_DOWN);
|
||||
}
|
||||
else
|
||||
{
|
||||
gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_DOWN);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -95,8 +103,15 @@ BOOL LLTool::handleMouseUp(S32 x, S32 y, MASK mask)
|
|||
LL_INFOS() << "LLTool left mouse up" << LL_ENDL;
|
||||
}
|
||||
// by default, didn't handle it
|
||||
// LL_INFOS() << "LLTool::handleMouseUp" << LL_ENDL;
|
||||
gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_UP);
|
||||
// LL_INFOS() << "LLTool::handleMouseUp" << LL_ENDL;
|
||||
if (gAgentCamera.cameraMouselook())
|
||||
{
|
||||
gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_UP);
|
||||
}
|
||||
else
|
||||
{
|
||||
gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_UP);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -760,12 +760,13 @@ BOOL LLToolCompGun::handleHover(S32 x, S32 y, MASK mask)
|
|||
|
||||
BOOL LLToolCompGun::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
// if the left button is grabbed, don't put up the pie menu
|
||||
if (gAgent.leftButtonGrabbed())
|
||||
{
|
||||
gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_DOWN);
|
||||
return FALSE;
|
||||
}
|
||||
// if the left button is blocked, don't put up the pie menu
|
||||
if (gAgent.leftButtonBlocked())
|
||||
{
|
||||
// in case of "grabbed" control flag will be set later
|
||||
gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_DOWN);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// On mousedown, start grabbing
|
||||
gGrabTransientTool = this;
|
||||
|
|
@ -777,12 +778,13 @@ BOOL LLToolCompGun::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
|
||||
BOOL LLToolCompGun::handleDoubleClick(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
// if the left button is grabbed, don't put up the pie menu
|
||||
if (gAgent.leftButtonGrabbed())
|
||||
{
|
||||
gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_DOWN);
|
||||
return FALSE;
|
||||
}
|
||||
// if the left button is blocked, don't put up the pie menu
|
||||
if (gAgent.leftButtonBlocked())
|
||||
{
|
||||
// in case of "grabbed" control flag will be set later
|
||||
gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_DOWN);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// On mousedown, start grabbing
|
||||
gGrabTransientTool = this;
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ BOOL LLToolGrab::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
// call the base class to propogate info to sim
|
||||
LLTool::handleMouseDown(x, y, mask);
|
||||
|
||||
if (!gAgent.leftButtonGrabbed())
|
||||
if (!gAgent.leftButtonBlocked())
|
||||
{
|
||||
// can grab transparent objects (how touch event propagates, scripters rely on this)
|
||||
gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ TRUE);
|
||||
|
|
|
|||
|
|
@ -94,7 +94,8 @@ LLToolPie::LLToolPie()
|
|||
mBlockClickToWalk(false),
|
||||
mClickAction(0),
|
||||
mClickActionBuyEnabled( gSavedSettings.getBOOL("ClickActionBuyEnabled") ),
|
||||
mClickActionPayEnabled( gSavedSettings.getBOOL("ClickActionPayEnabled") )
|
||||
mClickActionPayEnabled( gSavedSettings.getBOOL("ClickActionPayEnabled") ),
|
||||
mDoubleClickTimer()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -110,7 +111,12 @@ BOOL LLToolPie::handleAnyMouseClick(S32 x, S32 y, MASK mask, EClickType clicktyp
|
|||
|
||||
BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
mMouseOutsideSlop = FALSE;
|
||||
if (mDoubleClickTimer.getStarted())
|
||||
{
|
||||
mDoubleClickTimer.stop();
|
||||
}
|
||||
|
||||
mMouseOutsideSlop = FALSE;
|
||||
mMouseDownX = x;
|
||||
mMouseDownY = y;
|
||||
|
||||
|
|
@ -710,7 +716,15 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
|
|||
|
||||
BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
LLViewerObject* obj = mPick.getObject();
|
||||
if (!mDoubleClickTimer.getStarted())
|
||||
{
|
||||
mDoubleClickTimer.start();
|
||||
}
|
||||
else
|
||||
{
|
||||
mDoubleClickTimer.reset();
|
||||
}
|
||||
LLViewerObject* obj = mPick.getObject();
|
||||
U8 click_action = final_click_action(obj);
|
||||
|
||||
// let media have first pass at click
|
||||
|
|
@ -804,10 +818,17 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask)
|
|||
LL_INFOS() << "LLToolPie handleDoubleClick (becoming mouseDown)" << LL_ENDL;
|
||||
}
|
||||
|
||||
if (handleMediaDblClick(mPick))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
if (handleMediaDblClick(mPick))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (!mDoubleClickTimer.getStarted() || (mDoubleClickTimer.getElapsedTimeF32() > 0.3f))
|
||||
{
|
||||
mDoubleClickTimer.stop();
|
||||
return FALSE;
|
||||
}
|
||||
mDoubleClickTimer.stop();
|
||||
|
||||
if (gSavedSettings.getBOOL("DoubleClickAutoPilot"))
|
||||
{
|
||||
|
|
@ -820,6 +841,15 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask)
|
|||
FALSE /* ignore transparent */,
|
||||
FALSE /* ignore particles */);
|
||||
|
||||
if(mPick.mPickType == LLPickInfo::PICK_OBJECT)
|
||||
{
|
||||
if (mPick.getObject() && mPick.getObject()->isHUDAttachment())
|
||||
{
|
||||
mPick = savedPick;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if ((mPick.mPickType == LLPickInfo::PICK_LAND && !mPick.mPosGlobal.isExactlyZero()) ||
|
||||
(mPick.mObjectID.notNull() && !mPick.mPosGlobal.isExactlyZero()))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -129,6 +129,7 @@ private:
|
|||
LLSafeHandle<LLObjectSelection> mLeftClickSelection;
|
||||
BOOL mClickActionBuyEnabled;
|
||||
BOOL mClickActionPayEnabled;
|
||||
LLFrameTimer mDoubleClickTimer;
|
||||
|
||||
// <FS:ND> Keep track of name resolutions we made and delete them if needed to avoid crashing if this instance dies.
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -1688,6 +1688,8 @@ void LLViewerMedia::onTeleportFinished()
|
|||
{
|
||||
// On teleport, clear this setting (i.e. set it to true)
|
||||
gSavedSettings.setBOOL("MediaTentativeAutoPlay", true);
|
||||
|
||||
LLViewerMediaImpl::sMimeTypesFailed.clear();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1699,6 +1701,7 @@ void LLViewerMedia::setOnlyAudibleMediaTextureID(const LLUUID& texture_id)
|
|||
sForceUpdate = true;
|
||||
}
|
||||
|
||||
std::vector<std::string> LLViewerMediaImpl::sMimeTypesFailed;
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// LLViewerMediaImpl
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -1990,10 +1993,16 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
|
|||
}
|
||||
|
||||
LL_WARNS_ONCE("Plugin") << "plugin initialization failed for mime type: " << media_type << LL_ENDL;
|
||||
LLSD args;
|
||||
args["MIME_TYPE"] = media_type;
|
||||
LLNotificationsUtil::add("NoPlugin", args);
|
||||
|
||||
if(gAgent.isInitialized())
|
||||
{
|
||||
if (std::find(sMimeTypesFailed.begin(), sMimeTypesFailed.end(), media_type) == sMimeTypesFailed.end())
|
||||
{
|
||||
LLSD args;
|
||||
args["MIME_TYPE"] = media_type;
|
||||
LLNotificationsUtil::add("NoPlugin", args);
|
||||
sMimeTypesFailed.push_back(media_type);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -469,6 +469,7 @@ private:
|
|||
std::string mTarget;
|
||||
LLNotificationPtr mNotification;
|
||||
bool mCleanBrowser; // force the creation of a clean browsing target with full options enabled
|
||||
static std::vector<std::string> sMimeTypesFailed;
|
||||
|
||||
private:
|
||||
BOOL mIsUpdated ;
|
||||
|
|
|
|||
|
|
@ -3839,6 +3839,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
|||
send_do_not_disturb_message(msg, from_id);
|
||||
}
|
||||
// <FS:PP> FIRE-1245: Option to block/reject teleport offers
|
||||
//else if (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && (LLAvatarTracker::instance().getBuddyInfo(from_id) == NULL))
|
||||
//{
|
||||
// return;
|
||||
//}
|
||||
else if ( (is_rejecting_tp_offers && (!FSDontRejectTeleportOffersFromFriends || (FSDontRejectTeleportOffersFromFriends && !is_friend))) && (!fRlvAutoAccept) )
|
||||
{
|
||||
send_rejecting_tp_offers_message(msg, from_id);
|
||||
|
|
@ -5164,6 +5168,13 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
|
|||
LL_WARNS("Messaging") << "Got teleport notification for wrong agent!" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
if (gAgent.getTeleportState() == LLAgent::TELEPORT_NONE)
|
||||
{
|
||||
// Server either ignored teleport cancel message or did not receive it in time.
|
||||
// This message can't be ignored since teleport is complete at server side
|
||||
gAgent.restoreCanceledTeleportRequest();
|
||||
}
|
||||
|
||||
// Teleport is finished; it can't be cancelled now.
|
||||
gViewerWindow->setProgressCancelButtonVisible(FALSE);
|
||||
|
|
|
|||
|
|
@ -1513,6 +1513,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
|
|||
BOOL region_deny_identified_override = false; // Deprecated
|
||||
BOOL region_deny_transacted_override = false; // Deprecated
|
||||
BOOL region_deny_age_unverified_override = false;
|
||||
BOOL changed_parcel = false;
|
||||
|
||||
S32 other_clean_time = 0;
|
||||
|
||||
|
|
@ -1640,6 +1641,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
|
|||
if (parcel == parcel_mgr.mAgentParcel)
|
||||
{
|
||||
// new agent parcel
|
||||
changed_parcel = true;
|
||||
S32 bitmap_size = parcel_mgr.mParcelsPerEdge
|
||||
* parcel_mgr.mParcelsPerEdge
|
||||
/ 8;
|
||||
|
|
@ -1841,7 +1843,8 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
|
|||
LLStringUtil::trim(music_url);
|
||||
|
||||
// If there is a new music URL and it's valid, play it.
|
||||
if (music_url.size() > 12)
|
||||
const std::string& stream_url = gAudiop->getInternetStreamURL();
|
||||
if (music_url.size() > 12 && (music_url != stream_url || changed_parcel))
|
||||
{
|
||||
if (music_url.substr(0,7) == "http://")
|
||||
{
|
||||
|
|
@ -1855,7 +1858,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
|
|||
LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null);
|
||||
}
|
||||
}
|
||||
else if (!gAudiop->getInternetStreamURL().empty())
|
||||
else if (!stream_url.empty())
|
||||
{
|
||||
LL_INFOS() << "Stopping parcel music (parcel stream URL is empty)" << LL_ENDL;
|
||||
// null value causes fade out
|
||||
|
|
|
|||
|
|
@ -262,12 +262,12 @@ public:
|
|||
}
|
||||
}
|
||||
}
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect)
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect)
|
||||
{
|
||||
LLRect image_rect = draw_rect;
|
||||
LLRectf image_rect = draw_rect;
|
||||
image_rect.mRight = image_rect.mLeft + mImage->getWidth();
|
||||
image_rect.mTop = image_rect.mBottom + mImage->getHeight();
|
||||
mImage->draw(image_rect);
|
||||
mImage->draw(LLRect(image_rect.mLeft, image_rect.mTop, image_rect.mRight, image_rect.mBottom));
|
||||
|
||||
LLColor4 color;
|
||||
if (mEditor.getReadOnly())
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ S32 LLViewerTexture::sMaxSculptRez = 128; //max sculpt image size
|
|||
const S32 MAX_CACHED_RAW_IMAGE_AREA = 64 * 64;
|
||||
const S32 MAX_CACHED_RAW_SCULPT_IMAGE_AREA = LLViewerTexture::sMaxSculptRez * LLViewerTexture::sMaxSculptRez;
|
||||
const S32 MAX_CACHED_RAW_TERRAIN_IMAGE_AREA = 128 * 128;
|
||||
const S32 DEFAULT_ICON_DIMENTIONS = 32;
|
||||
S32 LLViewerTexture::sMinLargeImageSize = 65536; //256 * 256.
|
||||
S32 LLViewerTexture::sMaxSmallImageSize = MAX_CACHED_RAW_IMAGE_AREA;
|
||||
BOOL LLViewerTexture::sFreezeImageScalingDown = FALSE;
|
||||
|
|
@ -1214,6 +1215,17 @@ void LLViewerFetchedTexture::loadFromFastCache()
|
|||
}
|
||||
else
|
||||
{
|
||||
if (mBoostLevel == LLGLTexture::BOOST_ICON)
|
||||
{
|
||||
S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_ICON_DIMENTIONS;
|
||||
S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_ICON_DIMENTIONS;
|
||||
if (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height)
|
||||
{
|
||||
// scale oversized icon, no need to give more work to gl
|
||||
mRawImage->scale(expected_width, expected_height);
|
||||
}
|
||||
}
|
||||
|
||||
mRequestedDiscardLevel = mDesiredDiscardLevel + 1;
|
||||
mIsRawImageValid = TRUE;
|
||||
addToCreateTexture();
|
||||
|
|
@ -1582,6 +1594,17 @@ void LLViewerFetchedTexture::processTextureStats()
|
|||
{
|
||||
mDesiredDiscardLevel = 0;
|
||||
}
|
||||
else if (mDontDiscard && mBoostLevel == LLGLTexture::BOOST_ICON)
|
||||
{
|
||||
if (mFullWidth > MAX_IMAGE_SIZE_DEFAULT || mFullHeight > MAX_IMAGE_SIZE_DEFAULT)
|
||||
{
|
||||
mDesiredDiscardLevel = 1; // MAX_IMAGE_SIZE_DEFAULT = 1024 and max size ever is 2048
|
||||
}
|
||||
else
|
||||
{
|
||||
mDesiredDiscardLevel = 0;
|
||||
}
|
||||
}
|
||||
else if(!mFullWidth || !mFullHeight)
|
||||
{
|
||||
mDesiredDiscardLevel = llmin(getMaxDiscardLevel(), (S32)mLoadedCallbackDesiredDiscardLevel);
|
||||
|
|
@ -2040,6 +2063,17 @@ bool LLViewerFetchedTexture::updateFetch()
|
|||
addToCreateTexture();
|
||||
}
|
||||
|
||||
if (mBoostLevel == LLGLTexture::BOOST_ICON)
|
||||
{
|
||||
S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_ICON_DIMENTIONS;
|
||||
S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_ICON_DIMENTIONS;
|
||||
if (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height)
|
||||
{
|
||||
// scale oversized icon, no need to give more work to gl
|
||||
mRawImage->scale(expected_width, expected_height);
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
|
|
@ -2781,7 +2815,7 @@ LLImageRaw* LLViewerFetchedTexture::reloadRawImage(S8 discard_level)
|
|||
|
||||
if(mSavedRawDiscardLevel >= 0 && mSavedRawDiscardLevel <= discard_level)
|
||||
{
|
||||
if(mSavedRawDiscardLevel != discard_level)
|
||||
if (mSavedRawDiscardLevel != discard_level && mBoostLevel != BOOST_ICON)
|
||||
{
|
||||
mRawImage = new LLImageRaw(getWidth(discard_level), getHeight(discard_level), getComponents());
|
||||
mRawImage->copy(getSavedRawImage());
|
||||
|
|
@ -2882,8 +2916,25 @@ void LLViewerFetchedTexture::switchToCachedImage()
|
|||
void LLViewerFetchedTexture::setCachedRawImage(S32 discard_level, LLImageRaw* imageraw)
|
||||
{
|
||||
if(imageraw != mRawImage.get())
|
||||
{
|
||||
mCachedRawImage = imageraw;
|
||||
{
|
||||
if (mBoostLevel == LLGLTexture::BOOST_ICON)
|
||||
{
|
||||
S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_ICON_DIMENTIONS;
|
||||
S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_ICON_DIMENTIONS;
|
||||
if (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height)
|
||||
{
|
||||
mCachedRawImage = new LLImageRaw(expected_width, expected_height, imageraw->getComponents());
|
||||
mCachedRawImage->copyScaled(imageraw);
|
||||
}
|
||||
else
|
||||
{
|
||||
mCachedRawImage = imageraw;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mCachedRawImage = imageraw;
|
||||
}
|
||||
mCachedRawDiscardLevel = discard_level;
|
||||
mCachedRawImageReady = TRUE;
|
||||
}
|
||||
|
|
@ -2973,7 +3024,24 @@ void LLViewerFetchedTexture::saveRawImage()
|
|||
}
|
||||
|
||||
mSavedRawDiscardLevel = mRawDiscardLevel;
|
||||
mSavedRawImage = new LLImageRaw(mRawImage->getData(), mRawImage->getWidth(), mRawImage->getHeight(), mRawImage->getComponents());
|
||||
if (mBoostLevel == LLGLTexture::BOOST_ICON)
|
||||
{
|
||||
S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_ICON_DIMENTIONS;
|
||||
S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_ICON_DIMENTIONS;
|
||||
if (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height)
|
||||
{
|
||||
mSavedRawImage = new LLImageRaw(expected_width, expected_height, mRawImage->getComponents());
|
||||
mSavedRawImage->copyScaled(mRawImage);
|
||||
}
|
||||
else
|
||||
{
|
||||
mSavedRawImage = new LLImageRaw(mRawImage->getData(), mRawImage->getWidth(), mRawImage->getHeight(), mRawImage->getComponents());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mSavedRawImage = new LLImageRaw(mRawImage->getData(), mRawImage->getWidth(), mRawImage->getHeight(), mRawImage->getComponents());
|
||||
}
|
||||
|
||||
if(mForceToSaveRawImage && mSavedRawDiscardLevel <= mDesiredSavedRawDiscardLevel)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -128,11 +128,17 @@ void LLWatchdogTimeout::setTimeout(F32 d)
|
|||
void LLWatchdogTimeout::start(const char *state)
|
||||
// </FS:ND>
|
||||
{
|
||||
// Order of operation is very impmortant here.
|
||||
if (mTimeout == 0)
|
||||
{
|
||||
LL_WARNS() << "Cant' start watchdog entry - no timeout set" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
// Order of operation is very important here.
|
||||
// After LLWatchdogEntry::start() is called
|
||||
// LLWatchdogTimeout::isAlive() will be called asynchronously.
|
||||
ping(state);
|
||||
mTimer.start();
|
||||
mTimer.start();
|
||||
mTimer.setTimerExpirySec(mTimeout); // timer expiration set to 0 by start()
|
||||
LLWatchdogEntry::start();
|
||||
}
|
||||
|
||||
|
|
@ -242,7 +248,6 @@ void LLWatchdog::run()
|
|||
mSuspects.end(),
|
||||
std::not1(std::mem_fun(&LLWatchdogEntry::isAlive))
|
||||
);
|
||||
|
||||
if(result != mSuspects.end())
|
||||
{
|
||||
// error!!!
|
||||
|
|
|
|||
|
|
@ -6197,6 +6197,13 @@ void LLPipeline::calcNearbyLights(LLCamera& camera)
|
|||
{
|
||||
const Light* light = &(*iter);
|
||||
LLDrawable* drawable = light->drawable;
|
||||
const LLViewerObject *vobj = light->drawable->getVObj();
|
||||
if(vobj && vobj->getAvatar() && vobj->getAvatar()->isInMuteList())
|
||||
{
|
||||
drawable->clearState(LLDrawable::NEARBY_LIGHT);
|
||||
continue;
|
||||
}
|
||||
|
||||
LLVOVolume* volight = drawable->getVOVolume();
|
||||
if (!volight || !drawable->isState(LLDrawable::LIGHT))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1223,6 +1223,14 @@ You cannot wear this item because it has not yet loaded. Please try again in a m
|
|||
<tag>fail</tag>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="MustEnterPasswordToLogIn"
|
||||
type="alertmodal">
|
||||
<tag>fail</tag>
|
||||
Please enter your Password to log in.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="MustHaveAccountToLogIn"
|
||||
|
|
|
|||
Loading…
Reference in New Issue