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

View File

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

View File

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

View File

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

View File

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