diff options
author | Christian Klinger | 2016-05-23 11:29:04 +0200 |
---|---|---|
committer | Christian Klinger | 2016-05-23 11:29:04 +0200 |
commit | 20a7893699251e22493920e49ea813e45a588abd (patch) | |
tree | 97e3e740648b302d1670da5a5a679517909f8bec /src | |
parent | Render SVG image on loading with screen resolution. (diff) | |
download | pvs2-20a7893699251e22493920e49ea813e45a588abd.tar.gz pvs2-20a7893699251e22493920e49ea813e45a588abd.tar.xz pvs2-20a7893699251e22493920e49ea813e45a588abd.zip |
move back connectionframes that went out of the window due to resizing.
Diffstat (limited to 'src')
-rw-r--r-- | src/server/mainwindow/mainwindow.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp index 7b95982..e6efb1c 100644 --- a/src/server/mainwindow/mainwindow.cpp +++ b/src/server/mainwindow/mainwindow.cpp @@ -563,6 +563,7 @@ AspectStatus checkAspectRatio(const QSize& frameSize, const QSize& gridSize) { return GRID_OK; } + /***************************************************************************//** * Resize event. * @param e @@ -588,6 +589,15 @@ void MainWindow::resizeEvent(QResizeEvent* e) this->_tilesX = newGridSize.width(); this->_tilesY = newGridSize.height(); + /* Bring back frame that are now out of the screen */ + for (auto it = _clientFrames.begin(); it != _clientFrames.end(); ++it) { + const QPoint gp = (*it)->getGridPosition(); + if ( gp.x() > _tilesX || gp.y() > _tilesY ) { + qDebug() << "bring frame back"; + placeFrameInFreeSlot(*it, (*it)->getCurrentPosition()); + } + } + /* Resize all connection windows */ for (QList<ConnectionFrame*>::iterator it = _clientFrames.begin(); it != _clientFrames.end(); ++it) |