summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llscenemonitor.cpp16
-rw-r--r--indra/newview/llscenemonitor.h8
2 files changed, 22 insertions, 2 deletions
diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp
index 179a73413e..02912f12a9 100644
--- a/indra/newview/llscenemonitor.cpp
+++ b/indra/newview/llscenemonitor.cpp
@@ -39,6 +39,7 @@
#include "llspatialpartition.h"
#include "llagent.h"
#include "pipeline.h"
+#include "llviewerparcelmgr.h"
#include "llviewerpartsim.h"
LLSceneMonitorView* gSceneMonitorView = NULL;
@@ -702,6 +703,13 @@ LLSceneMonitorView::LLSceneMonitorView(const LLRect& rect)
setCanMinimize(false);
setCanClose(true);
+
+ sTeleportFinishConnection = LLViewerParcelMgr::getInstance()->setTeleportFinishedCallback(boost::bind(&LLSceneMonitorView::onTeleportFinished, this));
+}
+
+LLSceneMonitorView::~LLSceneMonitorView()
+{
+ sTeleportFinishConnection.disconnect();
}
void LLSceneMonitorView::onClose(bool app_quitting)
@@ -714,6 +722,14 @@ void LLSceneMonitorView::onClickCloseBtn(bool app_quitting)
setVisible(false);
}
+void LLSceneMonitorView::onTeleportFinished()
+{
+ if(isInVisibleChain())
+ {
+ LLSceneMonitor::getInstance()->reset();
+ }
+}
+
void LLSceneMonitorView::onVisibilityChange(BOOL visible)
{
if (!LLGLSLShader::sNoFixedFunction && visible)
diff --git a/indra/newview/llscenemonitor.h b/indra/newview/llscenemonitor.h
index 5bde3b5aab..2b6ea57b96 100644
--- a/indra/newview/llscenemonitor.h
+++ b/indra/newview/llscenemonitor.h
@@ -64,10 +64,12 @@ public:
void dumpToFile(std::string file_name);
bool hasResults() const { return mSceneLoadRecording.getResults().getDuration() != S32Seconds(0);}
+ void reset();
+
private:
void freezeScene();
void unfreezeScene();
- void reset();
+
LLRenderTarget& getCaptureTarget();
void generateDitheringTexture(S32 width, S32 height);
@@ -109,7 +111,7 @@ class LLSceneMonitorView : public LLFloater
{
public:
LLSceneMonitorView(const LLRect& rect);
-
+ ~LLSceneMonitorView();
virtual void draw();
virtual void onVisibilityChange(BOOL visible);
@@ -117,6 +119,8 @@ public:
protected:
virtual void onClose(bool app_quitting=false);
virtual void onClickCloseBtn(bool app_quitting=false);
+ void onTeleportFinished();
+ boost::signals2::connection sTeleportFinishConnection;
};
extern LLSceneMonitorView* gSceneMonitorView;