]> git.saurik.com Git - wxWidgets.git/blobdiff - demos/forty/playerdg.cpp
Some little additions to how wxBufferedDC is wrapped.
[wxWidgets.git] / demos / forty / playerdg.cpp
index fa3ea03d046635a980e8bb183a87e0f594a8fe4c..67e11b68eb7d6e2d4d29cdf50b141fd3ac845891 100644 (file)
@@ -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()