summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llpanelclassified.cpp10
-rw-r--r--indra/newview/llpanelclassified.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index 0bbd850eda..d59a7d752e 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -1252,6 +1252,7 @@ void LLPanelClassifiedInfo::onOpen(const LLSD& key)
resetData();
resetControls();
+ scrollToTop();
setClassifiedId(key["classified_id"]);
setClassifiedName(key["name"]);
@@ -1517,6 +1518,13 @@ LLRect LLPanelClassifiedInfo::getDefaultSnapshotRect()
return getChild<LLUICtrl>("snapshot_panel")->getLocalRect();
}
+void LLPanelClassifiedInfo::scrollToTop()
+{
+ LLScrollContainer* scrollContainer = findChild<LLScrollContainer>("profile_scroll");
+ if (scrollContainer)
+ scrollContainer->goToTop();
+}
+
void LLPanelClassifiedInfo::onMapClick()
{
LLFloaterWorldMap::getInstance()->trackLocation(getPosGlobal());
@@ -1612,6 +1620,8 @@ void LLPanelClassifiedEdit::onOpen(const LLSD& key)
mIsNew = classified_id.isNull();
+ scrollToTop();
+
if(mIsNew)
{
setAvatarId(gAgent.getID());
diff --git a/indra/newview/llpanelclassified.h b/indra/newview/llpanelclassified.h
index 1b5b5e54d8..78f095a9bb 100644
--- a/indra/newview/llpanelclassified.h
+++ b/indra/newview/llpanelclassified.h
@@ -299,6 +299,8 @@ protected:
LLRect getDefaultSnapshotRect();
+ void scrollToTop();
+
void onMapClick();
void onTeleportClick();
void onExit();