]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/combobox.cpp
Applied patch [ 583922 ] Make generic/wxListCtrl avail. in WIN32
[wxWidgets.git] / src / gtk / combobox.cpp
index 3cd992283dc03bf70c57b9f640342acd514416e3..55cbde698363aeec9f4c5ec70f13234b958376e5 100644 (file)
@@ -601,29 +601,29 @@ void wxComboBox::OnChar( wxKeyEvent &event )
                 event.SetEventObject( this );
                 GetEventHandler()->ProcessEvent( event );
             }
-            else
-            {
-                // This will invoke the dialog default action, such
-                // as the clicking the default button.
+
+            // This will invoke the dialog default action, such
+            // as the clicking the default button.
+
+            wxWindow *top_frame = m_parent;
+            while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
+            top_frame = top_frame->GetParent();
     
-                wxWindow *top_frame = m_parent;
-                while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
-                top_frame = top_frame->GetParent();
-        
-                if (top_frame && GTK_IS_WINDOW(top_frame->m_widget))
-                {
-                    GtkWindow *window = GTK_WINDOW(top_frame->m_widget);
+            if (top_frame && GTK_IS_WINDOW(top_frame->m_widget))
+            {
+                GtkWindow *window = GTK_WINDOW(top_frame->m_widget);
 
-                    if (window->default_widget)
-                    {
-                        gtk_widget_activate (window->default_widget);
-                        return;
-                    }
+                if (window->default_widget)
+                {
+                    gtk_widget_activate (window->default_widget);
+                    return;
                 }
             }
+            
+            return;
         }
     }
-
+    
     event.Skip();
 }