dialog_edit_module_for_BoardEditor.*: fix questionable code.
This commit is contained in:
parent
e97c91b025
commit
4b916b42ed
|
@ -58,11 +58,6 @@
|
|||
size_t DIALOG_MODULE_BOARD_EDITOR::m_page = 0; // remember the last open page during session
|
||||
|
||||
|
||||
wxBEGIN_EVENT_TABLE( DIALOG_MODULE_BOARD_EDITOR, wxDialog )
|
||||
EVT_CLOSE( DIALOG_MODULE_BOARD_EDITOR::OnCloseWindow )
|
||||
wxEND_EVENT_TABLE()
|
||||
|
||||
|
||||
DIALOG_MODULE_BOARD_EDITOR::DIALOG_MODULE_BOARD_EDITOR( PCB_EDIT_FRAME* aParent,
|
||||
MODULE* aModule,
|
||||
wxDC* aDC ) :
|
||||
|
@ -137,14 +132,6 @@ DIALOG_MODULE_BOARD_EDITOR::~DIALOG_MODULE_BOARD_EDITOR()
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_MODULE_BOARD_EDITOR::OnCloseWindow( wxCloseEvent &event )
|
||||
{
|
||||
m_PreviewPane->Close();
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
// Creation of the panel properties of the module editor.
|
||||
void DIALOG_MODULE_BOARD_EDITOR::InitBoardProperties()
|
||||
{
|
||||
|
@ -616,9 +603,6 @@ bool DIALOG_MODULE_BOARD_EDITOR::TransferDataFromWindow()
|
|||
wxPoint modpos;
|
||||
wxString msg;
|
||||
|
||||
BOARD_COMMIT commit( m_Parent );
|
||||
commit.Modify( m_CurrentModule );
|
||||
|
||||
if( !Validate() || !DIALOG_MODULE_BOARD_EDITOR_BASE::TransferDataFromWindow() ||
|
||||
!m_PanelProperties->TransferDataFromWindow() )
|
||||
{
|
||||
|
@ -638,6 +622,9 @@ bool DIALOG_MODULE_BOARD_EDITOR::TransferDataFromWindow()
|
|||
m_CurrentModule->Draw( m_Parent->GetCanvas(), m_DC, GR_XOR );
|
||||
}
|
||||
|
||||
BOARD_COMMIT commit( m_Parent );
|
||||
commit.Modify( m_CurrentModule );
|
||||
|
||||
// Init Fields (should be first, because they can be moved or/and flipped later):
|
||||
TEXTE_MODULE& reference = m_CurrentModule->Reference();
|
||||
reference = *m_ReferenceCopy;
|
||||
|
|
|
@ -101,14 +101,6 @@ private:
|
|||
|
||||
bool TransferDataToWindow() override;
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
/**
|
||||
* @brief OnCloseWindow - called when the frame is closed
|
||||
* @param event
|
||||
*/
|
||||
void OnCloseWindow( wxCloseEvent &event );
|
||||
|
||||
DECLARE_EVENT_TABLE();
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Dec 14 2016)
|
||||
// C++ code generated with wxFormBuilder (version Feb 19 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Dec 14 2016)
|
||||
// C++ code generated with wxFormBuilder (version Feb 19 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
|
Loading…
Reference in New Issue