]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/textdlgg.cpp
wxDocManager gets the only view if none other specified as the current view;
[wxWidgets.git] / src / generic / textdlgg.cpp
index 6b6ffac7bd67add7df74e00ccd6638ed613cf640..345d05740e89162a62fb3b74ddd2575cb867ec50 100644 (file)
@@ -111,10 +111,7 @@ wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent, const wxString& message,
   }
 
   if (ok)
-  {
     ok->SetDefault();
-    ok->SetFocus();
-  }
 
   Layout();
   Centre(wxBOTH);
@@ -136,7 +133,7 @@ wxString wxGetTextFromUser(const wxString& message, const wxString& caption,
                         int x, int y, bool WXUNUSED(centre) )
 {
     wxTextEntryDialog dialog(parent, message, caption, defaultValue, wxOK|wxCANCEL, wxPoint(x, y));
-    if (dialog.ShowModal() == wxOK)
+    if (dialog.ShowModal() == wxID_OK)
         return dialog.GetValue();
     else
         return wxString("");