summaryrefslogtreecommitdiffstats
path: root/src/server/mainwindow/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/mainwindow/mainwindow.cpp')
-rw-r--r--src/server/mainwindow/mainwindow.cpp46
1 files changed, 2 insertions, 44 deletions
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<QSettings> 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<QSettings> 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