]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dlgcmn.cpp
modified GetLastMenuItem() to also take into account the popup menu items
[wxWidgets.git] / src / common / dlgcmn.cpp
index 8ac52135d935b862c03b886d9856ba450e1a0b10..d41cd25f739fd2c20086fec584a1abd07709019e 100644 (file)
@@ -336,8 +336,6 @@ wxStdDialogButtonSizer *wxDialogBase::CreateStdDialogButtonSizer( long flags )
         sizer->AddButton(help);
     }
 
-    sizer->Realize();
-
     if (flags & wxNO_DEFAULT)
     {
         if (no)
@@ -359,12 +357,14 @@ wxStdDialogButtonSizer *wxDialogBase::CreateStdDialogButtonSizer( long flags )
             yes->SetFocus();
         }
     }
-    
+
     if (flags & wxOK)
         SetAffirmativeId(wxID_OK);
     else if (flags & wxYES)
         SetAffirmativeId(wxID_YES);
 
+    sizer->Realize();
+
     return sizer;
 }