summaryrefslogtreecommitdiffstats
path: root/src/server/mainwindow/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/mainwindow/mainwindow.cpp')
-rw-r--r--src/server/mainwindow/mainwindow.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp
index 82981b1..71ee8a6 100644
--- a/src/server/mainwindow/mainwindow.cpp
+++ b/src/server/mainwindow/mainwindow.cpp
@@ -129,7 +129,9 @@ MainWindow::MainWindow(QString ipListUrl, QWidget* parent) :
_discoveryListener = new DiscoveryListener();
// Finally
-// this->onSessionNameUpdate();
+ _countSessionNameUpdate = 0;
+ this->onSessionNameUpdate(); // Just make lable visible.
+ _countSessionNameUpdate = 0;
_tileWidth = ui->frmRoom->size().width() / _tilesX;
_tileHeight = ui->frmRoom->size().height() / _tilesY;
@@ -622,14 +624,18 @@ void MainWindow::onSessionNameClick()
*/
void MainWindow::onSessionNameUpdate()
{
+ _countSessionNameUpdate++;
// 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)
+ if (_countSessionNameUpdate > 1)
{
- (*it)->hide();
- (*it)->deleteLater();
+ for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it)
+ {
+ (*it)->hide();
+ (*it)->deleteLater();
+ }
+ _clientFrames.clear();
}
- _clientFrames.clear();
_sessionNameLabel->setText(tr("Session Name: %1 [click to edit]").arg(Global::sessionName()));
}