summaryrefslogtreecommitdiffstats
path: root/src/server/mainwindow/mainwindow.cpp
diff options
context:
space:
mode:
authorManuel Schneider2014-07-22 19:27:30 +0200
committerManuel Schneider2014-07-22 19:27:30 +0200
commit76023ce8e99517ee47e5547d7f673a7c1300ddb8 (patch)
tree5ab01018de54db737b31c277c1e236b5e05f96b9 /src/server/mainwindow/mainwindow.cpp
parentunify ConnectionFrame icons. (diff)
downloadpvs2-76023ce8e99517ee47e5547d7f673a7c1300ddb8.tar.gz
pvs2-76023ce8e99517ee47e5547d7f673a7c1300ddb8.tar.xz
pvs2-76023ce8e99517ee47e5547d7f673a7c1300ddb8.zip
Fix broadcast bug.
Diffstat (limited to 'src/server/mainwindow/mainwindow.cpp')
-rw-r--r--src/server/mainwindow/mainwindow.cpp24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp
index 3365473..d62336d 100644
--- a/src/server/mainwindow/mainwindow.cpp
+++ b/src/server/mainwindow/mainwindow.cpp
@@ -650,27 +650,19 @@ void MainWindow::onButtonTutorToAll()
QMessageBox::critical(this, tr("Projection"), sStrNoDestAv);
else
{
- DisableButtons();
-
- if (_mode != Mode::Broadcast)
+ if (_mode == Mode::Broadcast)
{
- // Set all clients as watchers
- for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it)
- {
- if ((*it)->client() != NULL && (*it)->client() != getClientFromId(_streamingSource)){
- (*it)->client()->setDesiredProjectionSource(getTutorFrame()->client()->id());
- }
-
- }
- }
- else // If this mode is already active
- {
- // Stop reset everything
+ // If this mode is already active, reset everything
reset();
- _mode = Mode::None;
return;
}
+ // Set all clients as watchers of tutor. Except for the tutors desired source, which hase to be none
+ for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it)
+ if ((*it)->client() != NULL)
+ (*it)->client()->setDesiredProjectionSource((*it)->client() == getTutorFrame()->client() ? NO_SOURCE : getTutorFrame()->client()->id());
+
+ DisableButtons();
_mode = Mode::Broadcast;
startVncServerIfNecessary(getTutorFrame()->client()->id());
}