From 420f2894746d21938083f6785d58c869ad2c3901 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 10 Oct 2016 17:02:22 +0200 Subject: [server] Remove loadPosition() as it's pointless with per-room layouts --- src/server/mainwindow/mainwindow.cpp | 46 ++---------------------------------- 1 file changed, 2 insertions(+), 44 deletions(-) (limited to 'src/server/mainwindow/mainwindow.cpp') diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp index 59e47a4..6a244fb 100644 --- a/src/server/mainwindow/mainwindow.cpp +++ b/src/server/mainwindow/mainwindow.cpp @@ -358,29 +358,6 @@ ConnectionFrame* MainWindow::createFrame(QString computerId, QPoint pxCoord, QPo return cf; } - -/***************************************************************************//** - * Load position. - * @param settings - * @param id - * @param x - * @param y - * @return If loadPosition was successfull. - */ -bool MainWindow::loadPosition(QSharedPointer settings, const QString& id, int& x, int& y) -{ - settings->beginGroup("client_position"); - const QVariant retval = (settings->value(id)); - settings->endGroup(); - if (retval.type() != QVariant::Point) - return false; - const QPoint point(retval.toPoint()); - x = point.x(); - y = point.y(); - return true; -} - - /***************************************************************************//** * Tells the new client the current situation in class room. * Set the specific parameters like projection source or lock screen. @@ -1271,27 +1248,8 @@ void MainWindow::onClientAuthenticated(Client* client) // New one, create ConnectionFrame *cf = createFrame(); - // Try to load last known position - int x, y; - bool ok; - - QSharedPointer sys = serverApp->getSettings(); - ok = loadPosition(sys, client->ip(), x, y); - - if (x >= _tilesX || y >= _tilesY) - ok = false; - if (ok) { - if (x < 0) - x = 0; - if (y < 0) - y = 0; - qDebug("Move E"); - cf->move(x * getTileWidthPx(), y * getTileHeightPx()); - onPlaceFrame(true, cf); - } else { - // Move to any free tile - placeFrameInFreeSlot(cf); - } + // Move to any free tile + placeFrameInFreeSlot(cf); // Set Tutor option cf->setTutor(isTutor); // Assign client instance -- cgit v1.2.3-55-g7522