summaryrefslogtreecommitdiffstats
path: root/src/server/mainwindow/mainwindow.cpp
diff options
context:
space:
mode:
authorBjörn Hagemeister2014-06-17 15:05:28 +0200
committerBjörn Hagemeister2014-06-17 15:05:28 +0200
commitbadab5545b2f51c5692fd03e5b3a657678880a66 (patch)
treec58bbe9371151cf8fccac3d6fbbd8bee820666ed /src/server/mainwindow/mainwindow.cpp
parentMoved method isManagerMachine() from MainWindow to Client. (diff)
downloadpvs2-badab5545b2f51c5692fd03e5b3a657678880a66.tar.gz
pvs2-badab5545b2f51c5692fd03e5b3a657678880a66.tar.xz
pvs2-badab5545b2f51c5692fd03e5b3a657678880a66.zip
Delete connected clients and connectionFrames after sessionName has changed.
Surround camera and eye icon with borderline for better contrast on frames.
Diffstat (limited to 'src/server/mainwindow/mainwindow.cpp')
-rw-r--r--src/server/mainwindow/mainwindow.cpp11
1 files changed, 10 insertions, 1 deletions
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<ConnectionFrame*>::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)