viewer#1131 Fix gltf editor being a bit spamy

master
Andrey Kleshchev 2024-07-08 13:11:07 +03:00 committed by Andrey Kleshchev
parent d0173ac7fc
commit 22782a0c68
2 changed files with 10 additions and 5 deletions

View File

@ -54,7 +54,7 @@ LLFloaterGLTFAssetEditor::~LLFloaterGLTFAssetEditor()
{
if (mScroller)
{
removeChild(mScroller);
mItemListPanel->removeChild(mScroller);
delete mScroller;
mScroller = NULL;
}
@ -345,13 +345,15 @@ void LLFloaterGLTFAssetEditor::dirty()
{
if (!mObject || !mAsset || !mFolderRoot)
{
closeFloater();
return;
}
if (LLSelectMgr::getInstance()->getSelection()->getObjectCount() > 1)
{
closeFloater();
if (getVisible())
{
closeFloater();
}
return;
}
@ -366,7 +368,10 @@ void LLFloaterGLTFAssetEditor::dirty()
LLViewerObject* objectp = node->getObject();
if (mObject != objectp || !objectp->mGLTFAsset)
{
closeFloater();
if (getVisible())
{
closeFloater();
}
return;
}

View File

@ -7194,7 +7194,7 @@ void dialog_refresh_all()
panel_task_info->dirty();
}
LLFloaterGLTFAssetEditor * gltf_editor = LLFloaterReg::getTypedInstance<LLFloaterGLTFAssetEditor>("gltf_asset_editor");
LLFloaterGLTFAssetEditor * gltf_editor = LLFloaterReg::findTypedInstance<LLFloaterGLTFAssetEditor>("gltf_asset_editor");
if (gltf_editor)
{
gltf_editor->dirty();