summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Schneider2014-07-22 19:27:30 +0200
committerManuel Schneider2014-07-22 19:27:30 +0200
commit76023ce8e99517ee47e5547d7f673a7c1300ddb8 (patch)
tree5ab01018de54db737b31c277c1e236b5e05f96b9
parentunify ConnectionFrame icons. (diff)
downloadpvs2-76023ce8e99517ee47e5547d7f673a7c1300ddb8.tar.gz
pvs2-76023ce8e99517ee47e5547d7f673a7c1300ddb8.tar.xz
pvs2-76023ce8e99517ee47e5547d7f673a7c1300ddb8.zip
Fix broadcast bug.
-rw-r--r--TODO3
-rw-r--r--src/server/mainwindow/mainwindow.cpp24
2 files changed, 10 insertions, 17 deletions
diff --git a/TODO b/TODO
index 10a8f94..85ca877 100644
--- a/TODO
+++ b/TODO
@@ -56,7 +56,8 @@ anmelden, in der Zwischenzeit kann das System auf den default resetten....>
--------------------------- P V S C L I E N T ----------------------------------
-[ ] Beim Client: Wenn Session-ID im laufenden betrieb geändert wird, fliegt der
+[funktioniert bei mir]
+Beim Client: Wenn Session-ID im laufenden betrieb geändert wird, fliegt der
Client raus. Man kann als Client (dann) keine neue Session-ID setzen.
[x] Informationsknopf im Clienten: <Fragzeichen-Symbol mit hinterlegtem>
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());
}