summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpicks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelpicks.cpp')
-rw-r--r--indra/newview/llpanelpicks.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index d374d24316..93317e613f 100644
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -34,6 +34,7 @@
#include "llagent.h"
#include "llavatarconstants.h"
+#include "llflatlistview.h"
#include "lltexturectrl.h"
#include "llviewergenericmessage.h" // send_generic_message
#include "llmenugl.h"
@@ -45,8 +46,6 @@
#include "llpanelavatar.h"
#include "llpanelprofile.h"
#include "llpanelpick.h"
-#include "llscrollcontainer.h"
-#include "lllistctrl.h"
static const std::string XML_BTN_NEW = "new_btn";
static const std::string XML_BTN_DELETE = "trash_btn";
@@ -148,7 +147,7 @@ LLPickItem* LLPanelPicks::getSelectedPickItem()
BOOL LLPanelPicks::postBuild()
{
- mPicksList = getChild<LLListCtrl>("picks_list");
+ mPicksList = getChild<LLFlatListView>("picks_list");
childSetAction(XML_BTN_DELETE, boost::bind(&LLPanelPicks::onClickDelete, this));
@@ -199,6 +198,11 @@ void LLPanelPicks::onOpen(const LLSD& key)
mPopupMenu->setItemVisible("pick_separator", TRUE);
}
+ if(getAvatarId() != key.asUUID())
+ {
+ mPicksList->goToTop();
+ }
+
LLPanelProfileTab::onOpen(key);
}
@@ -314,7 +318,7 @@ void LLPanelPicks::onClickNew()
{
buildPickPanel();
mPickPanel->setEditMode(TRUE);
- mPickPanel->createNewPick();
+ mPickPanel->prepareNewPick();
getProfilePanel()->togglePanel(mPickPanel);
}
@@ -386,7 +390,6 @@ void LLPickItem::init(LLPickData* pick_data)
setPickDesc(pick_data->desc);
setSnapshotId(pick_data->snapshot_id);
mPosGlobal = pick_data->pos_global;
- mLocation = pick_data->location_text;
LLTextureCtrl* picture = getChild<LLTextureCtrl>("picture");
picture->setImageAssetID(pick_data->snapshot_id);
@@ -434,11 +437,6 @@ const LLVector3d& LLPickItem::getPosGlobal()
return mPosGlobal;
}
-const std::string& LLPickItem::getLocation()
-{
- return mLocation;
-}
-
const std::string LLPickItem::getDescription()
{
return childGetValue("picture_descr").asString();