added LLProgressView::abortShowProgress. Issue upon failed login to terminate pending loginpanel destruction which was killing the actual 'new' replacement loginpanel instead of the old to-be-deleted version.

This commit is contained in:
Shyotl
2013-07-03 17:15:30 -05:00
parent 4455dd7eff
commit 8310575fc3
5 changed files with 20 additions and 9 deletions

View File

@@ -216,15 +216,8 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
setBackgroundVisible(FALSE); setBackgroundVisible(FALSE);
setBackgroundOpaque(TRUE); setBackgroundOpaque(TRUE);
// instance management gViewerWindow->abortShowProgress(); //Kill previous instance. It might still be alive, and if so, its probably pending
if (LLPanelLogin::sInstance) //deletion via the progressviews idle callback. Kill it now and unregister said idle callback.
{
LL_WARNS("AppInit") << "Duplicate instance of login view deleted" << LL_ENDL;
// Don't leave bad pointer in gFocusMgr
gFocusMgr.setDefaultKeyboardFocus(NULL);
delete LLPanelLogin::sInstance;
}
LLPanelLogin::sInstance = this; LLPanelLogin::sInstance = this;

View File

@@ -134,6 +134,14 @@ void LLProgressView::revealIntroPanel()
mFadeFromLoginTimer.start(); mFadeFromLoginTimer.start();
gIdleCallbacks.addFunction(onIdle, this); gIdleCallbacks.addFunction(onIdle, this);
} }
void LLProgressView::abortShowProgress()
{
mFadeFromLoginTimer.stop();
LLPanelLogin::close();
gIdleCallbacks.deleteFunction(onIdle, this);
}
void LLProgressView::setStartupComplete() void LLProgressView::setStartupComplete()
{ {
mStartupComplete = true; mStartupComplete = true;

View File

@@ -62,6 +62,7 @@ public:
void setMessage(const std::string& msg); void setMessage(const std::string& msg);
void revealIntroPanel(); void revealIntroPanel();
void abortShowProgress();
void setStartupComplete(); void setStartupComplete();

View File

@@ -5154,6 +5154,14 @@ void LLViewerWindow::revealIntroPanel()
} }
} }
void LLViewerWindow::abortShowProgress()
{
if (mProgressView)
{
mProgressView->abortShowProgress();
}
}
void LLViewerWindow::setShowProgress(const BOOL show) void LLViewerWindow::setShowProgress(const BOOL show)
{ {
if (mProgressView) if (mProgressView)

View File

@@ -280,6 +280,7 @@ public:
void setProgressCancelButtonVisible( BOOL b, const std::string& label = LLStringUtil::null ); void setProgressCancelButtonVisible( BOOL b, const std::string& label = LLStringUtil::null );
LLProgressView *getProgressView() const; LLProgressView *getProgressView() const;
void revealIntroPanel(); void revealIntroPanel();
void abortShowProgress();
void setStartupComplete(); void setStartupComplete();
void updateObjectUnderCursor(); void updateObjectUnderCursor();