From 9676448291e3faa7bbe476549b79a083945eaa7b Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Wed, 3 Mar 2010 10:32:26 +0200 Subject: Shortened code. --HG-- branch : product-engine --- indra/newview/llpanelclassified.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index 836331b44b..68691a1408 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -1290,18 +1290,11 @@ void LLPanelClassifiedInfo::resetData() void LLPanelClassifiedInfo::resetControls() { - if(getAvatarId() == gAgent.getID()) - { - childSetEnabled("edit_btn", TRUE); - childSetVisible("edit_btn", TRUE); - childSetVisible("auto_renew", TRUE); - } - else - { - childSetEnabled("edit_btn", FALSE); - childSetVisible("edit_btn", FALSE); - childSetVisible("auto_renew", FALSE); - } + bool is_self = getAvatarId() == gAgent.getID(); + + childSetEnabled("edit_btn", is_self); + childSetVisible("edit_btn", is_self); + childSetVisible("auto_renew", is_self); } void LLPanelClassifiedInfo::setClassifiedName(const std::string& name) -- cgit v1.2.3