diff options
author | Björn Hagemeister | 2014-06-17 15:05:28 +0200 |
---|---|---|
committer | Björn Hagemeister | 2014-06-17 15:05:28 +0200 |
commit | badab5545b2f51c5692fd03e5b3a657678880a66 (patch) | |
tree | c58bbe9371151cf8fccac3d6fbbd8bee820666ed /src/server | |
parent | Moved method isManagerMachine() from MainWindow to Client. (diff) | |
download | pvs2-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')
-rw-r--r-- | src/server/connectionframe/connectionframe.cpp | 6 | ||||
-rw-r--r-- | src/server/mainwindow/mainwindow.cpp | 11 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/server/connectionframe/connectionframe.cpp b/src/server/connectionframe/connectionframe.cpp index caf99fc..dbe408c 100644 --- a/src/server/connectionframe/connectionframe.cpp +++ b/src/server/connectionframe/connectionframe.cpp @@ -101,7 +101,11 @@ ConnectionFrame::ConnectionFrame(QWidget *parent, int width, int height) : ConnectionFrame::~ConnectionFrame() { - // + if (_client != NULL) + { + _client->deleteLater(); + } + _iconLayout->deleteLater(); } /** 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) |