X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/70d26c3f4ffb24d50457d405c9595fd23f9e5b7c..c74d8df09d0c0e182cb2063cc4cc546de3a00fae:/demos/forty/playerdg.cpp?ds=sidebyside diff --git a/demos/forty/playerdg.cpp b/demos/forty/playerdg.cpp index fa3ea03d04..67e11b68eb 100644 --- a/demos/forty/playerdg.cpp +++ b/demos/forty/playerdg.cpp @@ -116,13 +116,15 @@ PlayerSelectionDialog::PlayerSelectionDialog( list->SetConstraints(layout); wxString prevPlayer = m_scoreFile->GetPreviousPlayer(); - if (prevPlayer.Length() > 0) + if ((prevPlayer.Length() > 0) && (list->FindString(prevPlayer) != -1)) { list->SetStringSelection(prevPlayer); m_textField->SetValue(prevPlayer); } Layout(); + + CentreOnParent(); } PlayerSelectionDialog::~PlayerSelectionDialog()