diff options
| author | Sebastien Braun | 2010-10-04 00:25:02 +0200 |
|---|---|---|
| committer | Sebastien Braun | 2010-10-05 18:15:48 +0200 |
| commit | ea719ff8b67916ac0080295bd0698e4ca2a134c8 (patch) | |
| tree | f4fb912a587e8366fabe0615940ed7cda60df661 /src/gui/mainWindow.cpp | |
| parent | Implement first version of basic input event support (diff) | |
| download | pvs-ea719ff8b67916ac0080295bd0698e4ca2a134c8.tar.gz pvs-ea719ff8b67916ac0080295bd0698e4ca2a134c8.tar.xz pvs-ea719ff8b67916ac0080295bd0698e4ca2a134c8.zip | |
Fix a bug in closeup frame handling.
If, while a frame was in closeup mode, the corresponding client went away,
the ConnectionFrame would get deleted, but still referenced in
ConnectionWindow::_closeupFrame. Naturally, this led to disaster when the same (but really new) frame would be
selected again. QPointer guards against QObject's going AWOL.
Diffstat (limited to 'src/gui/mainWindow.cpp')
| -rw-r--r-- | src/gui/mainWindow.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/gui/mainWindow.cpp b/src/gui/mainWindow.cpp index eb15e82..8a2b512 100644 --- a/src/gui/mainWindow.cpp +++ b/src/gui/mainWindow.cpp @@ -742,19 +742,22 @@ void MainWindow::closeUp() QMessageBox::information(this, "PVS", message); } } - else if (conWin->getCloseupFrame()) + else { - /*PVSClient* pvsClient = - PVSConnectionManager::getManager()->getClientFromIp( - selectedClients->front().toStdString().c_str());*/ - conWin->getCloseupFrame()->setWindowFlags(Qt::Widget); - conWin->getCloseupFrame()->paintCloseUp(conWin->getCloseupFrame()->getPrevWidth(), conWin->getCloseupFrame()->getPrevHeight()); - conWin->getCloseupFrame()->move(_framePosOnCloseUp);//back to the position before the closeup - if (conWin->getCloseupFrame()->getConnection()->getVNCConnection()) - conWin->getCloseupFrame()->getFrame()->getVNCClientThread()->setUpdatefreq(_updatefreq); + if (conWin->getCloseupFrame()) + { + /*PVSClient* pvsClient = + PVSConnectionManager::getManager()->getClientFromIp( + selectedClients->front().toStdString().c_str());*/ + conWin->getCloseupFrame()->setWindowFlags(Qt::Widget); + conWin->getCloseupFrame()->paintCloseUp(conWin->getCloseupFrame()->getPrevWidth(), conWin->getCloseupFrame()->getPrevHeight()); + conWin->getCloseupFrame()->move(_framePosOnCloseUp);//back to the position before the closeup + if (conWin->getCloseupFrame()->getConnection()->getVNCConnection()) + conWin->getCloseupFrame()->getFrame()->getVNCClientThread()->setUpdatefreq(_updatefreq); + conWin->setCloseupFrame(NULL); + } is_closeup = false; - conWin->setCloseupFrame(NULL); } } |
