diff options
author | Christian Klinger | 2016-04-29 11:24:47 +0200 |
---|---|---|
committer | Christian Klinger | 2016-04-29 11:24:47 +0200 |
commit | ee0e88e4f8ecf5d3591e7a96d8af9f73380805d9 (patch) | |
tree | b545685fa011769cb4c7aeff01769a37c9bbead8 /src/server/mainwindow/mainwindow.cpp | |
parent | Rearranged buttons a little. (diff) | |
download | pvs2-ee0e88e4f8ecf5d3591e7a96d8af9f73380805d9.tar.gz pvs2-ee0e88e4f8ecf5d3591e7a96d8af9f73380805d9.tar.xz pvs2-ee0e88e4f8ecf5d3591e7a96d8af9f73380805d9.zip |
Tinted some Icons to differentiate between selected and non-selected students.
Diffstat (limited to 'src/server/mainwindow/mainwindow.cpp')
-rw-r--r-- | src/server/mainwindow/mainwindow.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp index 3becb23..48e9b18 100644 --- a/src/server/mainwindow/mainwindow.cpp +++ b/src/server/mainwindow/mainwindow.cpp @@ -579,6 +579,17 @@ void MainWindow::unlockContextButtons() { for (auto it = _contextButtons.begin(); it != _contextButtons.end(); ++it) { (*it)->setEnabled(true); } + /* and disable some again based on special rules */ + if (getSelectedFrame()->client() != NULL) { + ui->action_DeleteClient->setEnabled(false); + } + if (getSelectedFrame()->client() == NULL) { + ui->action_SetAsTutor->setEnabled(false); + ui->action_StudentToTutorExclusive->setEnabled(false); + ui->action_StudentToTutor->setEnabled(false); + } + + } /***************************************************************************//** * Handle Mouse Release Event. |