Commit bf45715c authored by NiranV's avatar NiranV

Merged Linden Release.

parents 52766916 47622f0a
6.3.6 6.3.7
\ No newline at end of file
...@@ -29,8 +29,10 @@ ...@@ -29,8 +29,10 @@
#include "llaudiosourcevo.h" #include "llaudiosourcevo.h"
#include "llagent.h"
#include "llagentcamera.h" #include "llagentcamera.h"
#include "llmutelist.h" #include "llmutelist.h"
#include "llviewercontrol.h"
#include "llviewerparcelmgr.h" #include "llviewerparcelmgr.h"
LLAudioSourceVO::LLAudioSourceVO(const LLUUID &sound_id, const LLUUID& owner_id, const F32 gain, LLViewerObject *objectp) LLAudioSourceVO::LLAudioSourceVO(const LLUUID &sound_id, const LLUUID& owner_id, const F32 gain, LLViewerObject *objectp)
...@@ -54,6 +56,79 @@ void LLAudioSourceVO::setGain(const F32 gain) ...@@ -54,6 +56,79 @@ void LLAudioSourceVO::setGain(const F32 gain)
mGain = llclamp(gain, 0.f, 1.f); mGain = llclamp(gain, 0.f, 1.f);
} }
void LLAudioSourceVO::checkCutOffRadius()
{
if (mSourceMuted // already muted by something, will be recalculated on update()
|| !mObjectp)
{
return;
}
F32 cutoff = mObjectp->getSoundCutOffRadius();
if (cutoff < 0.1f)
{
// consider cutoff below 0.1m as off (to avoid near zero comparison)
return;
}
LLVector3d pos_global = getPosGlobal();
if (!isInCutOffRadius(pos_global, cutoff))
{
mSourceMuted = true;
}
}
LLVector3d LLAudioSourceVO::getPosGlobal() const
{
if (mObjectp->isAttachment())
{
LLViewerObject* parent = mObjectp;
while (parent && !parent->isAvatar())
{
parent = (LLViewerObject*)parent->getParent();
}
if (parent)
{
return parent->getPositionGlobal();
}
}
else
{
return mObjectp->getPositionGlobal();
}
return LLVector3d();
}
bool LLAudioSourceVO::isInCutOffRadius(const LLVector3d pos_global, const F32 cutoff) const
{
static LLCachedControl<S32> ear_mode(gSavedSettings, "VoiceEarLocation", 0);
LLVector3d pos_ear;
switch (ear_mode())
{
case 0: // camera
pos_ear = gAgentCamera.getCameraPositionGlobal();
break;
case 1: // avatar
case 2:
// voice support 'mixed' in '2' case with agent's position and camera's rotations
// but it is not defined in settings and uses camera as default
pos_ear = gAgent.getPositionGlobal();
break;
default:
pos_ear = gAgentCamera.getCameraPositionGlobal();
break;
}
LLVector3d to_vec = pos_global - pos_ear;
F32 dist = (F32)to_vec.magVec();
return dist < cutoff;
}
void LLAudioSourceVO::updateMute() void LLAudioSourceVO::updateMute()
{ {
if (!mObjectp || mObjectp->isDead()) if (!mObjectp || mObjectp->isDead())
...@@ -63,26 +138,11 @@ void LLAudioSourceVO::updateMute() ...@@ -63,26 +138,11 @@ void LLAudioSourceVO::updateMute()
} }
bool mute = false; bool mute = false;
LLVector3d pos_global; LLVector3d pos_global = getPosGlobal();
if (mObjectp->isAttachment())
{
LLViewerObject* parent = mObjectp;
while (parent && !parent->isAvatar())
{
parent = (LLViewerObject*)parent->getParent();
}
if (parent)
{
pos_global = parent->getPositionGlobal();
}
}
else
{
pos_global = mObjectp->getPositionGlobal();
}
if (!LLViewerParcelMgr::getInstance()->canHearSound(pos_global)) F32 cutoff = mObjectp->getSoundCutOffRadius();
if ((cutoff > 0.1f && !isInCutOffRadius(pos_global, cutoff)) // consider cutoff below 0.1m as off
|| !LLViewerParcelMgr::getInstance()->canHearSound(pos_global))
{ {
mute = true; mute = true;
} }
......
...@@ -41,7 +41,11 @@ class LLAudioSourceVO : public LLAudioSource ...@@ -41,7 +41,11 @@ class LLAudioSourceVO : public LLAudioSource
/*virtual*/ void update(); /*virtual*/ void update();
/*virtual*/ void setGain(const F32 gain); /*virtual*/ void setGain(const F32 gain);
void checkCutOffRadius();
private: private:
LLVector3d getPosGlobal() const;
bool isInCutOffRadius(LLVector3d pos_global, const F32 cutoff) const;
void updateMute(); void updateMute();
private: private:
......
...@@ -175,7 +175,7 @@ BOOL LLConversationViewSession::postBuild() ...@@ -175,7 +175,7 @@ BOOL LLConversationViewSession::postBuild()
LLAvatarIconCtrl* icon = mItemPanel->getChild<LLAvatarIconCtrl>("avatar_icon"); LLAvatarIconCtrl* icon = mItemPanel->getChild<LLAvatarIconCtrl>("avatar_icon");
icon->setVisible(true); icon->setVisible(true);
icon->setValue(session->mOtherParticipantID); icon->setValue(session->mOtherParticipantID);
mSpeakingIndicator->setSpeakerId(gAgentID, session->mSessionID, true); mSpeakingIndicator->setSpeakerId(session->mOtherParticipantID, session->mSessionID, true);
mHasArrow = false; mHasArrow = false;
} }
break; break;
......
...@@ -433,7 +433,7 @@ void LLFloaterModelPreview::initModelPreview() ...@@ -433,7 +433,7 @@ void LLFloaterModelPreview::initModelPreview()
mModelPreview = new LLModelPreview(512, 512, this ); mModelPreview = new LLModelPreview(512, 512, this );
mModelPreview->setPreviewTarget(16.f); mModelPreview->setPreviewTarget(16.f);
mModelPreview->setDetailsCallback(boost::bind(&LLFloaterModelPreview::setDetails, this, _1, _2, _3, _4, _5)); mModelPreview->setDetailsCallback(boost::bind(&LLFloaterModelPreview::setDetails, this, _1, _2, _3, _4, _5));
mModelPreview->setModelUpdatedCallback(boost::bind(&LLFloaterModelPreview::toggleCalculateButton, this, _1)); mModelPreview->setModelUpdatedCallback(boost::bind(&LLFloaterModelPreview::modelUpdated, this, _1));
} }
void LLFloaterModelPreview::onViewOptionChecked(LLUICtrl* ctrl) void LLFloaterModelPreview::onViewOptionChecked(LLUICtrl* ctrl)
...@@ -510,7 +510,8 @@ void LLFloaterModelPreview::onClickCalculateBtn() ...@@ -510,7 +510,8 @@ void LLFloaterModelPreview::onClickCalculateBtn()
mModelPreview->getPreviewAvatar()->showAttachmentOverrides(); mModelPreview->getPreviewAvatar()->showAttachmentOverrides();
} }
mUploadModelUrl.clear(); mUploadModelUrl.clear();
mModelPhysicsFee.clear();
gMeshRepo.uploadModel(mModelPreview->mUploadData, mModelPreview->mPreviewScale, gMeshRepo.uploadModel(mModelPreview->mUploadData, mModelPreview->mPreviewScale,
childGetValue("upload_textures").asBoolean(), childGetValue("upload_textures").asBoolean(),
...@@ -4440,6 +4441,12 @@ void LLFloaterModelPreview::toggleCalculateButton() ...@@ -4440,6 +4441,12 @@ void LLFloaterModelPreview::toggleCalculateButton()
toggleCalculateButton(true); toggleCalculateButton(true);
} }
void LLFloaterModelPreview::modelUpdated(bool calculate_visible)
{
mModelPhysicsFee.clear();
toggleCalculateButton(calculate_visible);
}
void LLFloaterModelPreview::toggleCalculateButton(bool visible) void LLFloaterModelPreview::toggleCalculateButton(bool visible)
{ {
mCalculateBtn->setVisible(visible); mCalculateBtn->setVisible(visible);
...@@ -4465,7 +4472,10 @@ void LLFloaterModelPreview::toggleCalculateButton(bool visible) ...@@ -4465,7 +4472,10 @@ void LLFloaterModelPreview::toggleCalculateButton(bool visible)
childSetTextArg("download_weight", "[ST]", tbd); childSetTextArg("download_weight", "[ST]", tbd);
childSetTextArg("server_weight", "[SIM]", tbd); childSetTextArg("server_weight", "[SIM]", tbd);
childSetTextArg("physics_weight", "[PH]", tbd); childSetTextArg("physics_weight", "[PH]", tbd);
childSetTextArg("upload_fee", "[FEE]", tbd); if (!mModelPhysicsFee.isMap() || mModelPhysicsFee.emptyMap())
{
childSetTextArg("upload_fee", "[FEE]", tbd);
}
childSetTextArg("price_breakdown", "[STREAMING]", tbd); childSetTextArg("price_breakdown", "[STREAMING]", tbd);
childSetTextArg("price_breakdown", "[PHYSICS]", tbd); childSetTextArg("price_breakdown", "[PHYSICS]", tbd);
childSetTextArg("price_breakdown", "[INSTANCES]", tbd); childSetTextArg("price_breakdown", "[INSTANCES]", tbd);
...@@ -4525,10 +4535,21 @@ void LLFloaterModelPreview::handleModelPhysicsFeeReceived() ...@@ -4525,10 +4535,21 @@ void LLFloaterModelPreview::handleModelPhysicsFeeReceived()
mUploadBtn->setEnabled(isModelUploadAllowed()); mUploadBtn->setEnabled(isModelUploadAllowed());
} }
void LLFloaterModelPreview::setModelPhysicsFeeErrorStatus(S32 status, const std::string& reason) void LLFloaterModelPreview::setModelPhysicsFeeErrorStatus(S32 status, const std::string& reason, const LLSD& result)
{ {
LL_WARNS() << "LLFloaterModelPreview::setModelPhysicsFeeErrorStatus(" << status << " : " << reason << ")" << LL_ENDL; LL_WARNS() << "LLFloaterModelPreview::setModelPhysicsFeeErrorStatus(" << status << " : " << reason << ")" << LL_ENDL;
doOnIdleOneTime(boost::bind(&LLFloaterModelPreview::toggleCalculateButton, this, true)); doOnIdleOneTime(boost::bind(&LLFloaterModelPreview::toggleCalculateButton, this, true));
if (result.has("upload_price"))
{
mModelPhysicsFee = result;
childSetTextArg("upload_fee", "[FEE]", llformat("%d", result["upload_price"].asInteger()));
childSetVisible("upload_fee", true);
}
else
{
mModelPhysicsFee.clear();
}
} }
/*virtual*/ /*virtual*/
......
...@@ -126,7 +126,7 @@ class LLFloaterModelPreview : public LLFloaterModelUploadBase ...@@ -126,7 +126,7 @@ class LLFloaterModelPreview : public LLFloaterModelUploadBase
/*virtual*/ void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url); /*virtual*/ void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url);
void handleModelPhysicsFeeReceived(); void handleModelPhysicsFeeReceived();
/*virtual*/ void setModelPhysicsFeeErrorStatus(S32 status, const std::string& reason); /*virtual*/ void setModelPhysicsFeeErrorStatus(S32 status, const std::string& reason, const LLSD& result);
/*virtual*/ void onModelUploadSuccess(); /*virtual*/ void onModelUploadSuccess();
...@@ -209,6 +209,8 @@ class LLFloaterModelPreview : public LLFloaterModelUploadBase ...@@ -209,6 +209,8 @@ class LLFloaterModelPreview : public LLFloaterModelUploadBase
void onLoDSourceCommit(S32 lod); void onLoDSourceCommit(S32 lod);
void modelUpdated(bool calculate_visible);
// Toggles between "Calculate weights & fee" and "Upload" buttons. // Toggles between "Calculate weights & fee" and "Upload" buttons.
void toggleCalculateButton(bool visible); void toggleCalculateButton(bool visible);
......
...@@ -45,7 +45,7 @@ class LLFloaterModelUploadBase : public LLFloater, public LLUploadPermissionsObs ...@@ -45,7 +45,7 @@ class LLFloaterModelUploadBase : public LLFloater, public LLUploadPermissionsObs
virtual void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url) = 0; virtual void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url) = 0;
virtual void setModelPhysicsFeeErrorStatus(S32 status, const std::string& reason) = 0; virtual void setModelPhysicsFeeErrorStatus(S32 status, const std::string& reason, const LLSD& result) = 0;
virtual void onModelUploadSuccess() {}; virtual void onModelUploadSuccess() {};
......
...@@ -62,6 +62,8 @@ ...@@ -62,6 +62,8 @@
#pragma warning (disable:4702) #pragma warning (disable:4702)
#endif #endif
extern void on_new_message(const LLSD& msg);
// Strip out "Resident" for display, but only if the message came from a user // Strip out "Resident" for display, but only if the message came from a user
// (rather than a script) // (rather than a script)
static std::string clean_name_from_im(const std::string& name, EInstantMessage type) static std::string clean_name_from_im(const std::string& name, EInstantMessage type)
...@@ -1029,6 +1031,14 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, ...@@ -1029,6 +1031,14 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
} }
LLNotificationsUI::LLNotificationManager::instance().onChat(chat, args); LLNotificationsUI::LLNotificationManager::instance().onChat(chat, args);
if (message != "")
{
LLSD msg_notify;
msg_notify["session_id"] = LLUUID();
msg_notify["from_id"] = chat.mFromID;
msg_notify["source_type"] = chat.mSourceType;
on_new_message(msg_notify);
}
} }
...@@ -1560,6 +1570,12 @@ void LLIMProcessing::requestOfflineMessagesCoro(std::string url) ...@@ -1560,6 +1570,12 @@ void LLIMProcessing::requestOfflineMessagesCoro(std::string url)
return; return;
} }
if (gAgent.getRegion() == NULL)
{
LL_WARNS("Messaging") << "Region null while attempting to load messages." << LL_ENDL;
return;
}
LL_INFOS("Messaging") << "Processing offline messages." << LL_ENDL; LL_INFOS("Messaging") << "Processing offline messages." << LL_ENDL;
std::vector<U8> data; std::vector<U8> data;
......
...@@ -2288,7 +2288,7 @@ class LLIsItemRemovable : public LLFolderViewFunctor ...@@ -2288,7 +2288,7 @@ class LLIsItemRemovable : public LLFolderViewFunctor
// Can be destroyed (or moved to trash) // Can be destroyed (or moved to trash)
BOOL LLFolderBridge::isItemRemovable() const BOOL LLFolderBridge::isItemRemovable() const
{ {
if (!get_is_category_removable(getInventoryModel(), mUUID) || isMarketplaceListingsFolder()) if (!get_is_category_removable(getInventoryModel(), mUUID))
{ {
return FALSE; return FALSE;
} }
...@@ -2305,6 +2305,11 @@ BOOL LLFolderBridge::isItemRemovable() const ...@@ -2305,6 +2305,11 @@ BOOL LLFolderBridge::isItemRemovable() const
} }
} }
if (isMarketplaceListingsFolder() && (!LLMarketplaceData::instance().isSLMDataFetched() || LLMarketplaceData::instance().getActivationState(mUUID)))
{
return FALSE;
}
return TRUE; return TRUE;
} }
......
...@@ -1128,9 +1128,7 @@ void LLLocationInputCtrl::changeLocationPresentation() ...@@ -1128,9 +1128,7 @@ void LLLocationInputCtrl::changeLocationPresentation()
//change location presentation only if user does not select/paste anything and //change location presentation only if user does not select/paste anything and
//human-readable region name is being displayed //human-readable region name is being displayed
std::string text = mTextEntry->getText(); if(!mTextEntry->hasSelection() && mTextEntry->getText() == mHumanReadableLocation)
LLStringUtil::trim(text);
if(!mTextEntry->hasSelection() && text == mHumanReadableLocation)
{ {
//needs unescaped one //needs unescaped one
LLSLURL slurl; LLSLURL slurl;
......
...@@ -1294,6 +1294,11 @@ void LLMarketplaceData::setSLMDataFetched(U32 status) ...@@ -1294,6 +1294,11 @@ void LLMarketplaceData::setSLMDataFetched(U32 status)
} }
} }
bool LLMarketplaceData::isSLMDataFetched()
{
return mMarketPlaceDataFetched == MarketplaceFetchCodes::MARKET_FETCH_DONE;
}
// Creation / Deletion / Update // Creation / Deletion / Update
// Methods publicly called // Methods publicly called
bool LLMarketplaceData::createListing(const LLUUID& folder_id) bool LLMarketplaceData::createListing(const LLUUID& folder_id)
......
...@@ -204,7 +204,9 @@ class LLMarketplaceData ...@@ -204,7 +204,9 @@ class LLMarketplaceData
void setDataFetchedSignal(const status_updated_signal_t::slot_type& cb); void setDataFetchedSignal(const status_updated_signal_t::slot_type& cb);
void setSLMDataFetched(U32 status); void setSLMDataFetched(U32 status);
U32 getSLMDataFetched() { return mMarketPlaceDataFetched; } U32 getSLMDataFetched() { return mMarketPlaceDataFetched; }
bool isSLMDataFetched();
// High level create/delete/set Marketplace data: each method returns true if the function succeeds, false if error // High level create/delete/set Marketplace data: each method returns true if the function succeeds, false if error
bool createListing(const LLUUID& folder_id); bool createListing(const LLUUID& folder_id);
bool activateListing(const LLUUID& folder_id, bool activate, S32 depth = -1); bool activateListing(const LLUUID& folder_id, bool activate, S32 depth = -1);
......
...@@ -2776,7 +2776,7 @@ void LLMeshUploadThread::onCompleted(LLCore::HttpHandle handle, LLCore::HttpResp ...@@ -2776,7 +2776,7 @@ void LLMeshUploadThread::onCompleted(LLCore::HttpHandle handle, LLCore::HttpResp
if (observer) if (observer)
{ {
observer->setModelPhysicsFeeErrorStatus(status.toULong(), reason); observer->setModelPhysicsFeeErrorStatus(status.toULong(), reason, body["error"]);
} }
} }
else else
...@@ -2809,7 +2809,7 @@ void LLMeshUploadThread::onCompleted(LLCore::HttpHandle handle, LLCore::HttpResp ...@@ -2809,7 +2809,7 @@ void LLMeshUploadThread::onCompleted(LLCore::HttpHandle handle, LLCore::HttpResp
if (observer) if (observer)
{ {
observer->setModelPhysicsFeeErrorStatus(status.toULong(), reason); observer->setModelPhysicsFeeErrorStatus(status.toULong(), reason, body["error"]);
} }
} }
} }
......
...@@ -379,7 +379,7 @@ void LLNetMap::draw() ...@@ -379,7 +379,7 @@ void LLNetMap::draw()
LLColor4 color = show_as_friend ? map_avatar_friend_color : map_avatar_color; LLColor4 color = show_as_friend ? map_avatar_friend_color : map_avatar_color;
unknown_relative_z = positions[i].mdV[VZ] == COARSEUPDATE_MAX_Z && unknown_relative_z = positions[i].mdV[VZ] >= COARSEUPDATE_MAX_Z &&
camera_position.mV[VZ] >= COARSEUPDATE_MAX_Z; camera_position.mV[VZ] >= COARSEUPDATE_MAX_Z;
LLWorldMapView::drawAvatar( LLWorldMapView::drawAvatar(
......
...@@ -245,11 +245,11 @@ void LLOutputMonitorCtrl::draw() ...@@ -245,11 +245,11 @@ void LLOutputMonitorCtrl::draw()
// virtual // virtual
BOOL LLOutputMonitorCtrl::handleMouseUp(S32 x, S32 y, MASK mask) BOOL LLOutputMonitorCtrl::handleMouseUp(S32 x, S32 y, MASK mask)
{ {
if (mSpeakerId != gAgentID && !mShowParticipantsSpeaking) if (mSpeakerId != gAgentID)
{ {
LLFloaterReg::showInstance("floater_voice_volume", LLSD().with("avatar_id", mSpeakerId)); LLFloaterReg::showInstance("floater_voice_volume", LLSD().with("avatar_id", mSpeakerId));
} }
else if(mShowParticipantsSpeaking) else if (mShowParticipantsSpeaking)
{ {
LLFloaterReg::showInstance("chat_voice", LLSD()); LLFloaterReg::showInstance("chat_voice", LLSD());
} }
......
...@@ -1074,6 +1074,8 @@ void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential) ...@@ -1074,6 +1074,8 @@ void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential)
// selection failed, just deselect whatever might be selected // selection failed, just deselect whatever might be selected
mUsernameCombo->setValue(std::string()); mUsernameCombo->setValue(std::string());
mPasswordEdit->setValue(std::string()); mPasswordEdit->setValue(std::string());
// selection failed, fields will be mepty
updateLoginButtons(); updateLoginButtons();
} }
else else
...@@ -1089,6 +1091,8 @@ void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential) ...@@ -1089,6 +1091,8 @@ void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential)
if (ident.isMap() && ident.has("type")) if (ident.isMap() && ident.has("type"))
{ {
mUsernameCombo->add(LLPanelLogin::getUserName(credential), credential->userID(), ADD_BOTTOM, TRUE); mUsernameCombo->add(LLPanelLogin::getUserName(credential), credential->userID(), ADD_BOTTOM, TRUE);
// this llsd might hold invalid credencial (failed login), so
// do not add to the list, just set field.
setFields(credential); setFields(credential);
} }
else else
......
...@@ -82,8 +82,11 @@ ...@@ -82,8 +82,11 @@
#include <boost/bind.hpp> #include <boost/bind.hpp>
// "Features" Tab
const F32 DEFAULT_GRAVITY_MULTIPLIER = 1.f;
const F32 DEFAULT_DENSITY = 1000.f;
// "Features" Tab
BOOL LLPanelVolume::postBuild() BOOL LLPanelVolume::postBuild()
{ {
// Flexible Objects Parameters // Flexible Objects Parameters
...@@ -871,7 +874,7 @@ void LLPanelVolume::onLightSelectTexture(const LLSD& data) ...@@ -871,7 +874,7 @@ void LLPanelVolume::onLightSelectTexture(const LLSD& data)
// static // static
void LLPanelVolume::onCommitMaterial( LLUICtrl* ctrl, void* userdata ) void LLPanelVolume::onCommitMaterial( LLUICtrl* ctrl, void* userdata )
{ {
//LLPanelObject* self = (LLPanelObject*) userdata; LLPanelVolume* self = (LLPanelVolume*)userdata;
LLComboBox* box = (LLComboBox*) ctrl; LLComboBox* box = (LLComboBox*) ctrl;
if (box) if (box)
...@@ -882,6 +885,19 @@ void LLPanelVolume::onCommitMaterial( LLUICtrl* ctrl, void* userdata ) ...@@ -882,6 +885,19 @@ void LLPanelVolume::onCommitMaterial( LLUICtrl* ctrl, void* userdata )
if (material_name != LEGACY_FULLBRIGHT_DESC) if (material_name != LEGACY_FULLBRIGHT_DESC)
{ {
U8 material_code = LLMaterialTable::basic.getMCode(material_name); U8 material_code = LLMaterialTable::basic.getMCode(material_name);
if (self)
{
LLViewerObject* objectp = self->mObject;
if (objectp)
{
objectp->setPhysicsGravity(DEFAULT_GRAVITY_MULTIPLIER);
objectp->setPhysicsFriction(LLMaterialTable::basic.getFriction(material_code));
//currently density is always set to 1000 serverside regardless of chosen material,
//actual material density should be used here, if this behavior change
objectp->setPhysicsDensity(DEFAULT_DENSITY);
objectp->setPhysicsRestitution(LLMaterialTable::basic.getRestitution(material_code));
}
}
LLSelectMgr::getInstance()->selectionSetMaterial(material_code); LLSelectMgr::getInstance()->selectionSetMaterial(material_code);
} }
} }
......
...@@ -367,6 +367,7 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs, ...@@ -367,6 +367,7 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs,
previewEditor->makePristine(); previewEditor->makePristine();
BOOL modifiable = preview->canModify(preview->mObjectID, preview->getItem()); BOOL modifiable = preview->canModify(preview->mObjectID, preview->getItem());
preview->setEnabled(modifiable); preview->setEnabled(modifiable);
preview->syncExternal();
preview->mAssetStatus = PREVIEW_ASSET_LOADED;