summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-09-05 12:18:26 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-09-05 12:18:44 +0300
commitcaf95ed00b0d35e9071db157c68a57f09198a530 (patch)
tree979d72feadb2f002780e3dfde571ef60e6f6f40f
parenta3dff0db26c5faa1613b29721498baf530f12fed (diff)
SL-17999 Small cleanup
-rw-r--r--indra/newview/llpanelface.cpp26
-rw-r--r--indra/newview/llpanelprofile.cpp2
-rw-r--r--indra/newview/skins/default/xui/en/panel_tools_texture.xml2
3 files changed, 13 insertions, 17 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index c205efb436..ac4c76351d 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -188,7 +188,6 @@ BOOL LLPanelFace::postBuild()
LLColorSwatchCtrl* mShinyColorSwatch;
LLComboBox* mComboTexGen;
- LLComboBox* mComboMatMedia;
LLCheckBoxCtrl *mCheckFullbright;
@@ -199,10 +198,11 @@ BOOL LLPanelFace::postBuild()
setMouseOpaque(FALSE);
- LLTextureCtrl* pbr_ctrl = getChild<LLTextureCtrl>("pbr_control");
+ LLTextureCtrl* pbr_ctrl = findChild<LLTextureCtrl>("pbr_control");
if (pbr_ctrl)
{
- pbr_ctrl->setDefaultImageAssetID(LLUUID(gSavedSettings.getString("DefaultObjectTexture")));
+ pbr_ctrl->setDefaultImageAssetID(LLUUID::null);
+ pbr_ctrl->setBlankImageAssetID(LLUUID::null); // should there be some empty default material?
pbr_ctrl->setCommitCallback(boost::bind(&LLPanelFace::onCommitPbr, this, _2));
pbr_ctrl->setOnCancelCallback(boost::bind(&LLPanelFace::onCancelPbr, this, _2));
pbr_ctrl->setOnSelectCallback(boost::bind(&LLPanelFace::onSelectPbr, this, _2));
@@ -321,22 +321,22 @@ BOOL LLPanelFace::postBuild()
mComboTexGen->setFollows(FOLLOWS_LEFT | FOLLOWS_TOP);
}
- mComboMatMedia = getChild<LLComboBox>("combobox matmedia");
- if(mComboMatMedia)
+ LLComboBox* combo_mat_media = findChild<LLComboBox>("combobox matmedia");
+ if(combo_mat_media)
{
- mComboMatMedia->setCommitCallback(LLPanelFace::onCommitMaterialsMedia,this);
- mComboMatMedia->selectNthItem(MATMEDIA_MATERIAL);
+ combo_mat_media->setCommitCallback(LLPanelFace::onCommitMaterialsMedia,this);
+ combo_mat_media->selectNthItem(MATMEDIA_MATERIAL);
}
- LLRadioGroup* radio_mat_type = getChild<LLRadioGroup>("radio_material_type");
+ LLRadioGroup* radio_mat_type = findChild<LLRadioGroup>("radio_material_type");
if(radio_mat_type)
{
radio_mat_type->setCommitCallback(LLPanelFace::onCommitMaterialType, this);
radio_mat_type->selectNthItem(MATTYPE_DIFFUSE);
}
- LLRadioGroup* radio_pbr_type = getChild<LLRadioGroup>("radio_pbr_type");
- if (radio_mat_type)
+ LLRadioGroup* radio_pbr_type = findChild<LLRadioGroup>("radio_pbr_type");
+ if (radio_pbr_type)
{
radio_pbr_type->setCommitCallback(LLPanelFace::onCommitPbrType, this);
radio_pbr_type->selectNthItem(PBRTYPE_ALBEDO);
@@ -1660,7 +1660,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
clearCtrls();
// Disable non-UICtrls
- LLTextureCtrl* pbr_ctrl = getChild<LLTextureCtrl>("pbr_control");
+ LLTextureCtrl* pbr_ctrl = findChild<LLTextureCtrl>("pbr_control");
if (pbr_ctrl)
{
pbr_ctrl->setImageAssetID(LLUUID::null);
@@ -2126,7 +2126,7 @@ void LLPanelFace::onSelectPbr(const LLSD& data)
{
LLSelectMgr::getInstance()->saveSelectedObjectTextures();
- LLTextureCtrl* pbr_ctrl = getChild<LLTextureCtrl>("pbr_control");
+ LLTextureCtrl* pbr_ctrl = findChild<LLTextureCtrl>("pbr_control");
if (!pbr_ctrl) return;
if (!pbr_ctrl->getTentative())
{
@@ -3646,7 +3646,7 @@ void LLPanelFace::onTextureSelectionChanged(LLInventoryItem* itemp)
void LLPanelFace::onPbrSelectionChanged(LLInventoryItem* itemp)
{
- LLTextureCtrl* pbr_ctrl = getChild<LLTextureCtrl>("pbr_control");
+ LLTextureCtrl* pbr_ctrl = findChild<LLTextureCtrl>("pbr_control");
if (pbr_ctrl)
{
LLUUID obj_owner_id;
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 29c9329a26..09e568e9ac 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -887,8 +887,6 @@ BOOL LLPanelProfileSecondLife::postBuild()
mDiscardDescriptionChanges->setCommitCallback([this](LLUICtrl*, void*) { onDiscardDescriptionChanges(); }, nullptr);
mDescriptionEdit->setKeystrokeCallback([this](LLTextEditor* caller) { onSetDescriptionDirty(); });
- getChild<LLButton>("open_notes")->setCommitCallback([this](LLUICtrl*, void*) { onOpenNotes(); }, nullptr);
-
mCanSeeOnlineIcon->setMouseUpCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { onShowAgentPermissionsDialog(); });
mCantSeeOnlineIcon->setMouseUpCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { onShowAgentPermissionsDialog(); });
mCanSeeOnMapIcon->setMouseUpCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { onShowAgentPermissionsDialog(); });
diff --git a/indra/newview/skins/default/xui/en/panel_tools_texture.xml b/indra/newview/skins/default/xui/en/panel_tools_texture.xml
index 54a00da294..9bdfff41d8 100644
--- a/indra/newview/skins/default/xui/en/panel_tools_texture.xml
+++ b/indra/newview/skins/default/xui/en/panel_tools_texture.xml
@@ -252,8 +252,6 @@
width="64" />
<texture_picker
can_apply_immediately="true"
- default_image_name="Default"
- fallback_image="materials_ui_x_24.png"
follows="left|top"
height="80"
label="PBR "