diff --git a/eeschema/dialog_find.cpp b/eeschema/dialog_find.cpp index 75b767dfd3..a70ea58734 100644 --- a/eeschema/dialog_find.cpp +++ b/eeschema/dialog_find.cpp @@ -1,12 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// // Name: dialog_find.cpp -// Purpose: +// Purpose: // Author: jean-pierre Charras -// Modified by: +// Modified by: // Created: 16/02/2006 20:18:11 -// RCS-ID: +// RCS-ID: // Copyright: License GNU -// Licence: +// Licence: ///////////////////////////////////////////////////////////////////////////// // Generated by DialogBlocks (unregistered), 16/02/2006 20:18:11 @@ -59,7 +59,7 @@ WinEDA_FindFrame::WinEDA_FindFrame( ) WinEDA_FindFrame::WinEDA_FindFrame( WinEDA_SchematicFrame* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) { - m_Parent = parent; + m_Parent = parent; Create(parent, id, caption, pos, size, style); } @@ -82,6 +82,16 @@ bool WinEDA_FindFrame::Create( wxWindow* parent, wxWindowID id, const wxString& GetSizer()->SetSizeHints(this); Centre(); ////@end WinEDA_FindFrame creation + + m_NewTextCtrl->SetFocus(); + + /* does not work here, might work if moved elsewhere, + see void DrcDialog::OnInitDialog( wxInitDialogEvent& event ) + // deselect the existing text, seems SetFocus() wants to emulate + // Microsoft and select all text, which is not desireable here. + m_NewTextCtrl->SetSelection(0,0); + */ + return true; } @@ -90,9 +100,9 @@ bool WinEDA_FindFrame::Create( wxWindow* parent, wxWindowID id, const wxString& */ void WinEDA_FindFrame::CreateControls() -{ - SetFont(*g_DialogFont); - +{ + SetFont(*g_DialogFont); + ////@begin WinEDA_FindFrame content construction // Generated by DialogBlocks, 03/03/2006 08:14:51 (unregistered) @@ -185,7 +195,7 @@ wxIcon WinEDA_FindFrame::GetIconResource( const wxString& name ) void WinEDA_FindFrame::OnFindSheetClick( wxCommandEvent& event ) { - FindSchematicItem(event); + FindSchematicItem(event); } /*! @@ -194,7 +204,7 @@ void WinEDA_FindFrame::OnFindSheetClick( wxCommandEvent& event ) void WinEDA_FindFrame::OnFindHierarchyClick( wxCommandEvent& event ) { - FindSchematicItem(event); + FindSchematicItem(event); } /*! @@ -203,7 +213,7 @@ void WinEDA_FindFrame::OnFindHierarchyClick( wxCommandEvent& event ) void WinEDA_FindFrame::OnLocateInLibrariesClick( wxCommandEvent& event ) { - LocatePartInLibs(event); + LocatePartInLibs(event); } /*! @@ -212,7 +222,7 @@ void WinEDA_FindFrame::OnLocateInLibrariesClick( wxCommandEvent& event ) void WinEDA_FindFrame::OnFindNextMarkerClick( wxCommandEvent& event ) { - FindMarker(event); + FindMarker(event); } @@ -222,7 +232,7 @@ void WinEDA_FindFrame::OnFindNextMarkerClick( wxCommandEvent& event ) void WinEDA_FindFrame::OnFindMarkersClick( wxCommandEvent& event ) { - FindMarker(event); + FindMarker(event); } @@ -232,7 +242,7 @@ void WinEDA_FindFrame::OnFindMarkersClick( wxCommandEvent& event ) void WinEDA_FindFrame::OnFindNextClick( wxCommandEvent& event ) { - FindSchematicItem(event); + FindSchematicItem(event); }