← Back to team overview

kicad-developers team mailing list archive

[PATCH] Fix enter button in dialog_edit_module_text

 

The Enter button cannot be used as OK in DialogEditModuleText while in a 
text field. This patch fixes that.

--
Chris
commit f459b217a8cc55d8d80463933ecceca02aa213c6
Author: Chris Pavlina <cpavlin1@xxxxxxxxxxxxxx>
Date:   Mon Jul 20 19:45:53 2015 -0400

    Fix enter button in dialog_edit_module_text

diff --git a/pcbnew/dialogs/dialog_edit_module_text.cpp b/pcbnew/dialogs/dialog_edit_module_text.cpp
index aa73c9f..03ecc1f 100644
--- a/pcbnew/dialogs/dialog_edit_module_text.cpp
+++ b/pcbnew/dialogs/dialog_edit_module_text.cpp
@@ -75,10 +75,7 @@ DialogEditModuleText::DialogEditModuleText( PCB_BASE_FRAME* aParent,
 
     initDlg();
 
-    wxButton* okButton = (wxButton*) FindWindowById( wxID_OK );
-
-    if( okButton )
-        SetDefaultItem( okButton );
+    m_sdbSizer1OK->SetDefault();
 
     GetSizer()->Fit( this );
     GetSizer()->SetSizeHints( this );

Follow ups