DIALOG_LIB_EDIT_TEXT: Remove useless code creating a wxWidgets alert. Fixes #8093 https://gitlab.com/kicad/code/kicad/issues/8093

This commit is contained in:
jean-pierre charras 2021-04-03 17:41:30 +02:00
parent cb17c9f3dd
commit 2b89511887
5 changed files with 0 additions and 15 deletions

View File

@ -166,12 +166,3 @@ bool DIALOG_LIB_EDIT_TEXT::TransferDataFromWindow()
return true;
}
void DIALOG_LIB_EDIT_TEXT::OnTextEnter( wxCommandEvent& event )
{
if( IsQuasiModal() )
EndQuasiModal( wxID_OK );
else
EndModal( wxID_OK );
}

View File

@ -39,8 +39,6 @@ public:
DIALOG_LIB_EDIT_TEXT( SYMBOL_EDIT_FRAME* aParent, LIB_TEXT* aText );
~DIALOG_LIB_EDIT_TEXT() override {};
void OnTextEnter( wxCommandEvent& event ) override;
private:
bool TransferDataToWindow() override;
bool TransferDataFromWindow() override;

View File

@ -219,7 +219,6 @@ DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindow
// Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnCloseDialog ) );
m_TextCtrl->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnSetFocusText ), NULL, this );
m_TextCtrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnTextEnter ), NULL, this );
m_StyledTextCtrl->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnSetFocusText ), NULL, this );
m_TextValueSelectButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnTextValueSelectButtonClick ), NULL, this );
}
@ -229,7 +228,6 @@ DIALOG_LIB_EDIT_TEXT_BASE::~DIALOG_LIB_EDIT_TEXT_BASE()
// Disconnect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnCloseDialog ) );
m_TextCtrl->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnSetFocusText ), NULL, this );
m_TextCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnTextEnter ), NULL, this );
m_StyledTextCtrl->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnSetFocusText ), NULL, this );
m_TextValueSelectButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnTextValueSelectButtonClick ), NULL, this );

View File

@ -210,7 +210,6 @@
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnSetFocus">OnSetFocusText</event>
<event name="OnTextEnter">OnTextEnter</event>
</object>
</object>
<object class="sizeritem" expanded="1">

View File

@ -73,7 +73,6 @@ class DIALOG_LIB_EDIT_TEXT_BASE : public DIALOG_SHIM
// Virtual event handlers, overide them in your derived class
virtual void OnCloseDialog( wxCloseEvent& event ) { event.Skip(); }
virtual void OnSetFocusText( wxFocusEvent& event ) { event.Skip(); }
virtual void OnTextEnter( wxCommandEvent& event ) { event.Skip(); }
virtual void OnTextValueSelectButtonClick( wxCommandEvent& event ) { event.Skip(); }