Fix a crash when viewing statistics including a score on a course which is not found.
[scorecard] / src / score-dialog.cpp
index 29b018c..867c373 100644 (file)
@@ -61,7 +61,7 @@ ScoreWindow::~ScoreWindow()
 void ScoreWindow::setup(Score *score, Course *course)
 {
     TRACE;
-    QString title = QString("Score: %1, %2 - %3").arg(score->getClubName()).arg(score->getCourseName()).arg(score->getDate());
+    QString title = QString("%1, %2 - %3").arg(score->getClubName()).arg(score->getCourseName()).arg(score->getDate());
     setWindowTitle(title);
     model->set(score, course);
 }
@@ -326,6 +326,8 @@ void ScoreDialog::init(Course *course, Score *score)
             table->setItem(ROW_SCORE_2, i-9, scoreItem);
         }
     }
+    // This - for some unknown reason - does not work ...
+    table->setInputMethodHints(Qt::ImhDigitsOnly);
 
     // Set focus to 1st cell
     table->setCurrentCell(ROW_SCORE, 0);