From badab5545b2f51c5692fd03e5b3a657678880a66 Mon Sep 17 00:00:00 2001 From: Björn Hagemeister Date: Tue, 17 Jun 2014 15:05:28 +0200 Subject: Delete connected clients and connectionFrames after sessionName has changed. Surround camera and eye icon with borderline for better contrast on frames. --- src/server/mainwindow/mainwindow.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/server/mainwindow/mainwindow.cpp') diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp index 5063df6..bbabc66 100644 --- a/src/server/mainwindow/mainwindow.cpp +++ b/src/server/mainwindow/mainwindow.cpp @@ -498,6 +498,14 @@ void MainWindow::onSessionNameClick() */ void MainWindow::onSessionNameUpdate() { + // Stop all projections and clear all clients, which where connected to old sessionName. + reset(); + for (QList::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) + { + (*it)->hide(); + (*it)->deleteLater(); + } + _clientFrames.clear(); _sessionNameLabel->setText(tr("Session Name: %1 [click to edit]").arg(Global::sessionName())); } @@ -992,7 +1000,8 @@ void MainWindow::onVncClientStateChange(Client* client) // VNC Client stopped -> remove from watchers if (!client->isActiveVncClient()){ // _watchers.remove(client->id()); - getClientFromId(client->id())->setWatcher(false); + if (getClientFromId(client->id()) != NULL) + getClientFromId(client->id())->setWatcher(false); // If noboody is watching the multicast stop VNC server // if (_watchers.isEmpty() && _mode != Mode::Broadcast) -- cgit v1.2.3-55-g7522