Fix Creator and Last Owner not showing in edit tools

Also fix special cases where there are owners that are not a single user
This commit is contained in:
Liru Færs
2019-10-11 05:33:54 -04:00
parent 975f3b420e
commit fdeb194d0e

View File

@@ -391,23 +391,46 @@ void LLPanelPermissions::refresh()
getChildView("Last Owner:")->setEnabled(TRUE);
std::string owner_app_link;
if (auto view = getChild<LLTextBox>("Creator Name"))
{
if (LLSelectMgr::getInstance()->selectGetCreator(mCreatorID, owner_app_link))
{
view->setValue(mCreatorID);
}
else
{
view->setValue(LLUUID::null);
view->setText(owner_app_link);
}
view->setEnabled(true);
}
const BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_app_link);
if (auto view = getChildView("Creator Name"))
if (auto view = getChild<LLTextBox>("Owner Name"))
{
view->setValue(mCreatorID);
if (owners_identical)
{
view->setValue(mOwnerID);
}
else
{
view->setValue(LLUUID::null);
view->setText(owner_app_link);
}
view->setEnabled(true);
}
if (auto view = getChild<LLUICtrl>("Owner Name"))
if (auto view = getChild<LLTextBox>("Last Owner Name"))
{
view->setValue(mOwnerID);
view->setEnabled(true);
}
if (auto view = getChild<LLUICtrl>("Last Owner Name"))
{
view->setValue(mLastOwnerID);
if (LLSelectMgr::getInstance()->selectGetLastOwner(mLastOwnerID, owner_app_link))
{
view->setValue(mLastOwnerID);
}
else
{
view->setValue(LLUUID::null);
view->setText(owner_app_link);
}
view->setEnabled(true);
}