fix a wxWidgets minor alert and compil warnings

This commit is contained in:
jean-pierre charras 2020-05-12 19:40:56 +02:00
parent a632e5fbdb
commit 2cf82d9129
5 changed files with 20 additions and 18 deletions

View File

@ -52,7 +52,7 @@
#include <ws_data_model.h>
#include <connection_graph.h>
#include <tool/actions.h>
#include <tools/sch_editor_control.h>>
#include <tools/sch_editor_control.h>
#include <netlist.h>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 6 2019)
// C++ code generated with wxFormBuilder (version Jul 10 2019)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -360,7 +360,7 @@ DIALOG_FOOTPRINT_FP_EDITOR_BASE::DIALOG_FOOTPRINT_FP_EDITOR_BASE( wxWindow* pare
bSizer3DButtons->Add( m_button3DShapeBrowse, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
bSizer3DButtons->Add( 0, 0, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
bSizer3DButtons->Add( 0, 0, 0, wxLEFT|wxRIGHT, 5 );
m_button3DShapeRemove = new wxBitmapButton( sbSizer3->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,29 ), wxBU_AUTODRAW|0 );
bSizer3DButtons->Add( m_button3DShapeRemove, 0, wxALIGN_CENTER_VERTICAL, 5 );

View File

@ -14,6 +14,7 @@
<property name="file">dialog_edit_footprint_for_fp_editor_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">dialog_edit_footprint_for_fp_editor_base</property>
@ -25,6 +26,7 @@
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
@ -2887,7 +2889,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT</property>
<property name="flag">wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="spacer" expanded="1">
<property name="height">0</property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 6 2019)
// C++ code generated with wxFormBuilder (version Jul 10 2019)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!

View File

@ -1032,36 +1032,36 @@ MODULE* PCB_BASE_FRAME::CreateNewModule( const wxString& aModuleName )
// Update its name in lib
module->SetFPID( LIB_ID( wxEmptyString, moduleName ) );
PCB_LAYER_ID layer;
PCB_LAYER_ID txt_layer;
wxPoint default_pos;
BOARD_DESIGN_SETTINGS& settings = GetDesignSettings();
module->Reference().SetText( settings.m_DefaultFPTextItems[0].m_Text );
module->Reference().SetVisible( settings.m_DefaultFPTextItems[0].m_Visible );
layer = (PCB_LAYER_ID) settings.m_DefaultFPTextItems[0].m_Layer;
module->Reference().SetLayer( layer );
default_pos.y -= settings.GetTextSize( layer ).y / 2;
txt_layer = (PCB_LAYER_ID) settings.m_DefaultFPTextItems[0].m_Layer;
module->Reference().SetLayer( txt_layer );
default_pos.y -= settings.GetTextSize( txt_layer ).y / 2;
module->Reference().SetPosition( default_pos );
default_pos.y += settings.GetTextSize( layer ).y;
default_pos.y += settings.GetTextSize( txt_layer ).y;
module->Value().SetText( settings.m_DefaultFPTextItems[1].m_Text );
module->Value().SetVisible( settings.m_DefaultFPTextItems[1].m_Visible );
layer = (PCB_LAYER_ID) settings.m_DefaultFPTextItems[1].m_Layer;
module->Value().SetLayer( layer );
default_pos.y += settings.GetTextSize( layer ).y / 2;
txt_layer = (PCB_LAYER_ID) settings.m_DefaultFPTextItems[1].m_Layer;
module->Value().SetLayer( txt_layer );
default_pos.y += settings.GetTextSize( txt_layer ).y / 2;
module->Value().SetPosition( default_pos );
default_pos.y += settings.GetTextSize( layer ).y;
default_pos.y += settings.GetTextSize( txt_layer ).y;
for( size_t i = 2; i < settings.m_DefaultFPTextItems.size(); ++i )
{
TEXTE_MODULE* textItem = new TEXTE_MODULE( module );
textItem->SetText( settings.m_DefaultFPTextItems[i].m_Text );
textItem->SetVisible( settings.m_DefaultFPTextItems[i].m_Visible );
layer = (PCB_LAYER_ID) settings.m_DefaultFPTextItems[i].m_Layer;
textItem->SetLayer( layer );
default_pos.y += settings.GetTextSize( layer ).y / 2;
txt_layer = (PCB_LAYER_ID) settings.m_DefaultFPTextItems[i].m_Layer;
textItem->SetLayer( txt_layer );
default_pos.y += settings.GetTextSize( txt_layer ).y / 2;
textItem->SetPosition( default_pos );
default_pos.y += settings.GetTextSize( layer ).y;
default_pos.y += settings.GetTextSize( txt_layer ).y;
module->GraphicalItems().push_back( textItem );
}