diff --git a/campcaster/src/products/gLiveSupport/src/LiveModeWindow.h b/campcaster/src/products/gLiveSupport/src/LiveModeWindow.h index 984a6e4ac..1fed4b240 100644 --- a/campcaster/src/products/gLiveSupport/src/LiveModeWindow.h +++ b/campcaster/src/products/gLiveSupport/src/LiveModeWindow.h @@ -361,6 +361,18 @@ class LiveModeWindow : public GuiWindow */ void refreshPlaylist(Ptr::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 */ diff --git a/campcaster/src/products/gLiveSupport/src/MasterPanelWindow.cxx b/campcaster/src/products/gLiveSupport/src/MasterPanelWindow.cxx index e3c22e2c6..92a39c363 100644 --- a/campcaster/src/products/gLiveSupport/src/MasterPanelWindow.cxx +++ b/campcaster/src/products/gLiveSupport/src/MasterPanelWindow.cxx @@ -678,7 +678,7 @@ MasterPanelWindow :: showAnonymousUI(void) throw () if (liveModeWindow->is_visible()) { liveModeWindow->hide(); } - liveModeWindow.reset(); + // the Live Mode window is not destroyed at logout, unlike the others } if (uploadFileWindow.get()) { if (uploadFileWindow->is_visible()) { @@ -755,6 +755,10 @@ MasterPanelWindow :: showLoggedInUI(void) throw () } setSchedulerAvailable(gLiveSupport->isSchedulerAvailable()); + + if (liveModeWindow && liveModeWindow->isNotEmpty()) { + liveModeWindow->present(); + } }