From e62bfe39493163b15aa0a8f2bc394ec565d87cc6 Mon Sep 17 00:00:00 2001 From: NeoTheFox Date: Mon, 9 Mar 2015 16:04:56 +0300 Subject: [PATCH] Settings cleanup --- mainwindow.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 54e9f7a..b2f22f4 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -408,11 +408,8 @@ void MainWindow::bedcenter() { int x, y; - if(settings.value("printer/bedx").toInt()) x = settings.value("printer/bedx").toInt(); - else x = 200; - - if(settings.value("printer/bedy").toInt()) y = settings.value("printer/bedy").toInt(); - else y = 200; + x = settings.value("printer/bedx", 200).toInt(); + y = settings.value("printer/bedy", 200).toInt(); QString command = "G1 X" + QString::number(x/2) + "Y" + QString::number(y/2); injectCommand(command);