not destroying the Live Mode window on logout

(part of #1940)
This commit is contained in:
fgerlits 2006-11-14 18:52:17 +00:00
parent d7062149ea
commit 8b979c9f76
2 changed files with 17 additions and 1 deletions

View file

@ -361,6 +361,18 @@ class LiveModeWindow : public GuiWindow
*/ */
void void
refreshPlaylist(Ptr<Playlist>::Ref playlist) throw (); refreshPlaylist(Ptr<Playlist>::Ref playlist) throw ();
/**
* Report whether the window is non-empty.
*
* @return true if there is at least one Playable item in the window.
*/
bool
isNotEmpty(void) throw ()
{
return (treeModel->children().size() != 0);
}
}; };
/* ================================================= external data structures */ /* ================================================= external data structures */

View file

@ -678,7 +678,7 @@ MasterPanelWindow :: showAnonymousUI(void) throw ()
if (liveModeWindow->is_visible()) { if (liveModeWindow->is_visible()) {
liveModeWindow->hide(); liveModeWindow->hide();
} }
liveModeWindow.reset(); // the Live Mode window is not destroyed at logout, unlike the others
} }
if (uploadFileWindow.get()) { if (uploadFileWindow.get()) {
if (uploadFileWindow->is_visible()) { if (uploadFileWindow->is_visible()) {
@ -755,6 +755,10 @@ MasterPanelWindow :: showLoggedInUI(void) throw ()
} }
setSchedulerAvailable(gLiveSupport->isSchedulerAvailable()); setSchedulerAvailable(gLiveSupport->isSchedulerAvailable());
if (liveModeWindow && liveModeWindow->isNotEmpty()) {
liveModeWindow->present();
}
} }