qgo (2~svn764-1) 01_gnugo

Summary

 src/mainwindow_settings.cpp |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

    
download this patch

Patch contents

--- a/src/mainwindow_settings.cpp	(revision 764)
+++ b/src/mainwindow_settings.cpp	(working copy)
@@ -269,7 +269,13 @@
 	QVariant var;
 	
 	ui.comboBox_language->setCurrentIndex (settings.value("LANGUAGE").toInt());
-	ui.LineEdit_computer->setText(settings.value("COMPUTER_PATH").toString());
+        QString computer_path = settings.value("COMPUTER_PATH").toString();
+        qDebug() << "COMPUTER_PATH" << computer_path;
+        if (computer_path == "") {
+                computer_path = "/usr/games/gnugo";
+                settings.setValue("COMPUTER_PATH", computer_path);
+        }
+	ui.LineEdit_computer->setText(computer_path);
 	if(settings.value("COMPUTER_PLAYS_WHITE").toBool())
 		ui.computerPlaysWhite->setChecked(TRUE);
 	else