Skip to content
Snippets Groups Projects
Commit c290b0cc authored by callum's avatar callum
Browse files

Merge with head

parents 2d1ad908 b477f3c9
No related branches found
No related tags found
No related merge requests found
...@@ -389,6 +389,7 @@ LLTeleportHistoryPanel::~LLTeleportHistoryPanel() ...@@ -389,6 +389,7 @@ LLTeleportHistoryPanel::~LLTeleportHistoryPanel()
{ {
LLTeleportHistoryFlatItemStorage::instance().purge(); LLTeleportHistoryFlatItemStorage::instance().purge();
delete mGearMenuHandle.get(); delete mGearMenuHandle.get();
mTeleportHistoryChangedConnection.disconnect();
} }
BOOL LLTeleportHistoryPanel::postBuild() BOOL LLTeleportHistoryPanel::postBuild()
......
...@@ -56,7 +56,8 @@ const std::string& LLTeleportHistoryItem::getTitle() const ...@@ -56,7 +56,8 @@ const std::string& LLTeleportHistoryItem::getTitle() const
LLTeleportHistory::LLTeleportHistory(): LLTeleportHistory::LLTeleportHistory():
mCurrentItem(-1), mCurrentItem(-1),
mRequestedItem(-1), mRequestedItem(-1),
mGotInitialUpdate(false) mGotInitialUpdate(false),
mTeleportHistoryStorage(NULL)
{ {
mTeleportFinishedConn = LLViewerParcelMgr::getInstance()-> mTeleportFinishedConn = LLViewerParcelMgr::getInstance()->
setTeleportFinishedCallback(boost::bind(&LLTeleportHistory::updateCurrentLocation, this, _1)); setTeleportFinishedCallback(boost::bind(&LLTeleportHistory::updateCurrentLocation, this, _1));
...@@ -115,6 +116,10 @@ void LLTeleportHistory::handleLoginComplete() ...@@ -115,6 +116,10 @@ void LLTeleportHistory::handleLoginComplete()
void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos) void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos)
{ {
if (!mTeleportHistoryStorage)
{
mTeleportHistoryStorage = LLTeleportHistoryStorage::getInstance();
}
if (mRequestedItem != -1) // teleport within the history in progress? if (mRequestedItem != -1) // teleport within the history in progress?
{ {
mCurrentItem = mRequestedItem; mCurrentItem = mRequestedItem;
...@@ -152,7 +157,7 @@ void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos) ...@@ -152,7 +157,7 @@ void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos)
if (mCurrentItem < 0 || mCurrentItem >= (int) mItems.size()) // sanity check if (mCurrentItem < 0 || mCurrentItem >= (int) mItems.size()) // sanity check
{ {
llwarns << "Invalid current item. (this should not happen)" << llendl; llwarns << "Invalid current item. (this should not happen)" << llendl;
llassert(!"Invalid current teleport histiry item"); llassert(!"Invalid current teleport history item");
return; return;
} }
LLVector3 new_pos_local = gAgent.getPosAgentFromGlobal(new_pos); LLVector3 new_pos_local = gAgent.getPosAgentFromGlobal(new_pos);
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <string> #include <string>
#include <boost/function.hpp> #include <boost/function.hpp>
#include <boost/signals2.hpp> #include <boost/signals2.hpp>
#include "llteleporthistorystorage.h"
/** /**
...@@ -210,6 +211,8 @@ class LLTeleportHistory: public LLSingleton<LLTeleportHistory> ...@@ -210,6 +211,8 @@ class LLTeleportHistory: public LLSingleton<LLTeleportHistory>
*/ */
bool mGotInitialUpdate; bool mGotInitialUpdate;
LLTeleportHistoryStorage* mTeleportHistoryStorage;
/** /**
* Signal emitted when the history gets changed. * Signal emitted when the history gets changed.
* *
......
...@@ -93,9 +93,6 @@ class LLTeleportHistoryStorage: public LLSingleton<LLTeleportHistoryStorage> ...@@ -93,9 +93,6 @@ class LLTeleportHistoryStorage: public LLSingleton<LLTeleportHistoryStorage>
void removeItem(S32 idx); void removeItem(S32 idx);
void save(); void save();
void load();
void dump() const;
/** /**
* Set a callback to be called upon history changes. * Set a callback to be called upon history changes.
...@@ -113,6 +110,9 @@ class LLTeleportHistoryStorage: public LLSingleton<LLTeleportHistoryStorage> ...@@ -113,6 +110,9 @@ class LLTeleportHistoryStorage: public LLSingleton<LLTeleportHistoryStorage>
private: private:
void load();
void dump() const;
void onTeleportHistoryChange(); void onTeleportHistoryChange();
bool compareByTitleAndGlobalPos(const LLTeleportHistoryPersistentItem& a, const LLTeleportHistoryPersistentItem& b); bool compareByTitleAndGlobalPos(const LLTeleportHistoryPersistentItem& a, const LLTeleportHistoryPersistentItem& b);
......
...@@ -53,10 +53,12 @@ ...@@ -53,10 +53,12 @@
#include "llinventorymodel.h" #include "llinventorymodel.h"
#include "llinventoryobserver.h" #include "llinventoryobserver.h"
#include "lllandmarklist.h" #include "lllandmarklist.h"
#include "llprogressview.h"
#include "llsky.h" #include "llsky.h"
#include "llui.h" #include "llui.h"
#include "llviewercamera.h" #include "llviewercamera.h"
#include "llviewerinventory.h" #include "llviewerinventory.h"
#include "llviewerwindow.h"
#include "llworld.h" #include "llworld.h"
#include "llworldmapview.h" #include "llworldmapview.h"
#include "llviewercontrol.h" #include "llviewercontrol.h"
...@@ -111,6 +113,8 @@ void LLTracker::drawHUDArrow() ...@@ -111,6 +113,8 @@ void LLTracker::drawHUDArrow()
{ {
if (!gSavedSettings.getBOOL("RenderTrackerBeacon")) return; if (!gSavedSettings.getBOOL("RenderTrackerBeacon")) return;
if (gViewerWindow->getProgressView()->getVisible()) return;
static LLUIColor map_track_color = LLUIColorTable::instance().getColor("MapTrackColor", LLColor4::white); static LLUIColor map_track_color = LLUIColorTable::instance().getColor("MapTrackColor", LLColor4::white);
/* tracking autopilot destination has been disabled /* tracking autopilot destination has been disabled
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
help_topic="move_floater" help_topic="move_floater"
save_rect="true" save_rect="true"
save_visibility="true" save_visibility="true"
save_dock_state="true" single_instance="true"
chrome="true" chrome="true"
title="MOVE" title="MOVE"
width="133"> width="133">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment