diff --git a/3d-viewer/3d_draw.cpp b/3d-viewer/3d_draw.cpp index 9fe8219876..4b8cf2198e 100644 --- a/3d-viewer/3d_draw.cpp +++ b/3d-viewer/3d_draw.cpp @@ -486,7 +486,7 @@ void EDA_3D_CANVAS::Redraw() glCallList( m_glLists[GL_ID_TECH_LAYERS] ); } - if( isEnabled( FL_COMMENTS ) || isEnabled( FL_COMMENTS ) ) + if( isEnabled( FL_COMMENTS ) || isEnabled( FL_ECO ) ) { if( ! m_glLists[GL_ID_AUX_LAYERS] ) CreateDrawGL_List( &errorReporter, &activityReporter ); diff --git a/common/dialogs/dialog_env_var_config.cpp b/common/dialogs/dialog_env_var_config.cpp index 12d0657168..885c5047b1 100644 --- a/common/dialogs/dialog_env_var_config.cpp +++ b/common/dialogs/dialog_env_var_config.cpp @@ -29,6 +29,7 @@ #include #include +#include DIALOG_ENV_VAR_CONFIG::DIALOG_ENV_VAR_CONFIG( wxWindow* aParent, const ENV_VAR_MAP& aEnvVarMap ) : @@ -230,3 +231,40 @@ void DIALOG_ENV_VAR_CONFIG::OnDeleteSelectedRows( wxCommandEvent& aEvent ) n++; } } + + +void DIALOG_ENV_VAR_CONFIG::OnHelpRequest( wxCommandEvent& aEvent ) +{ + wxString msg = _( "Enter the names and paths for each path.

" + "Grey enteries are names that have been defined externally " + "as system or user level environment variables." ); + msg << wxT( "

" ); + msg << _( "To avoid issues, names accept only upper case letters and digits." ); + msg << wxT( "

" ); + msg << _( "KIGITHUB is often used in Kicad packages to define " + "the URL of the repository of our official libraries." ); + msg << wxT( "
" ); + msg << _( "KISYS3DMOD is the base path of footprint 3D shapes (.3Dshapes folders)." ); + msg << wxT( "
" ); + msg << _( "KISYSMOD is the base path of local footprint libraries (.pretty folders)." ); + msg << wxT( "

" ); + msg << _( "A other environment variable is automatically defined by Kicad (cannot be edited):" ); + msg << wxT( "
" ); + msg << _( "KIPRJMOD is the absolute path of the current project" ); + msg << wxT( "
" ); + msg << _( "For instance, ${KIPRJMOD}/libs/footprints.pretty is the folder " + "libs/footprints.pretty located in the current project." ); + msg << wxT( "

" ); + msg << _( "Auxiliary environment variable name used by Kicad if exists:" ); + msg << wxT( "
" ); + msg << _( "KICAD_PTEMPLATES can be defined if you want to create " + "and use project templates (specific folders containing the template files) " + "in a given master folder" ); + msg << wxT( "
" ); + msg << _( "It is the base path of these project template folders" ); + + HTML_MESSAGE_BOX dlg( this, _( "Paths Definition" ), wxDefaultPosition, + wxSize( 650, 450 ) ); + dlg.AddHTML_Text( msg ); + dlg.ShowModal(); +} diff --git a/common/dialogs/dialog_env_var_config_base.cpp b/common/dialogs/dialog_env_var_config_base.cpp index eab37d33c8..b16f9f0cc7 100644 --- a/common/dialogs/dialog_env_var_config_base.cpp +++ b/common/dialogs/dialog_env_var_config_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jun 5 2014) +// C++ code generated with wxFormBuilder (version Jun 17 2015) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -45,8 +45,6 @@ DIALOG_ENV_VAR_CONFIG_BASE::DIALOG_ENV_VAR_CONFIG_BASE( wxWindow* parent, wxWind // Cell Defaults m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP ); - m_grid->SetToolTip( _("Enter the names and paths for each path.\n\nGrey enteries are names that have been defined externally as system or user level environment variables.") ); - bSizer1->Add( m_grid, 1, wxALL|wxEXPAND, 5 ); @@ -72,6 +70,9 @@ DIALOG_ENV_VAR_CONFIG_BASE::DIALOG_ENV_VAR_CONFIG_BASE( wxWindow* parent, wxWind bSizer2->Add( m_buttonDelete, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); + m_buttonHelp = new wxButton( this, wxID_ANY, _("Help"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_buttonHelp, 0, wxALL, 5 ); + mainSizer->Add( bSizer2, 0, wxEXPAND, 5 ); @@ -85,6 +86,7 @@ DIALOG_ENV_VAR_CONFIG_BASE::DIALOG_ENV_VAR_CONFIG_BASE( wxWindow* parent, wxWind // Connect Events m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnAddRow ), NULL, this ); m_buttonDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnDeleteSelectedRows ), NULL, this ); + m_buttonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnHelpRequest ), NULL, this ); } DIALOG_ENV_VAR_CONFIG_BASE::~DIALOG_ENV_VAR_CONFIG_BASE() @@ -92,5 +94,6 @@ DIALOG_ENV_VAR_CONFIG_BASE::~DIALOG_ENV_VAR_CONFIG_BASE() // Disconnect Events m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnAddRow ), NULL, this ); m_buttonDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnDeleteSelectedRows ), NULL, this ); + m_buttonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnHelpRequest ), NULL, this ); } diff --git a/common/dialogs/dialog_env_var_config_base.fbp b/common/dialogs/dialog_env_var_config_base.fbp index 79535f30b9..00dfe7e6b8 100644 --- a/common/dialogs/dialog_env_var_config_base.fbp +++ b/common/dialogs/dialog_env_var_config_base.fbp @@ -184,7 +184,7 @@ 0 - Enter the names and paths for each path. Grey enteries are names that have been defined externally as system or user level environment variables. + @@ -608,6 +608,94 @@ + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Help + + 0 + + + 0 + + 1 + m_buttonHelp + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnHelpRequest + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/common/dialogs/dialog_env_var_config_base.h b/common/dialogs/dialog_env_var_config_base.h index 5f65f14a9c..2b20344c2a 100644 --- a/common/dialogs/dialog_env_var_config_base.h +++ b/common/dialogs/dialog_env_var_config_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jun 5 2014) +// C++ code generated with wxFormBuilder (version Jun 17 2015) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -40,10 +40,12 @@ class DIALOG_ENV_VAR_CONFIG_BASE : public DIALOG_SHIM wxButton* m_buttonCancel; wxButton* m_buttonAdd; wxButton* m_buttonDelete; + wxButton* m_buttonHelp; // Virtual event handlers, overide them in your derived class virtual void OnAddRow( wxCommandEvent& event ) { event.Skip(); } virtual void OnDeleteSelectedRows( wxCommandEvent& event ) { event.Skip(); } + virtual void OnHelpRequest( wxCommandEvent& event ) { event.Skip(); } public: diff --git a/common/displlst.cpp b/common/displlst.cpp index afea2109d5..b8961f6ad6 100644 --- a/common/displlst.cpp +++ b/common/displlst.cpp @@ -236,7 +236,8 @@ void EDA_LIST_DIALOG::onClose( wxCloseEvent& event ) /* Sort alphabetically, case insensitive. */ -static int wxCALLBACK MyCompareFunction( wxIntPtr aItem1, wxIntPtr aItem2, wxIntPtr aSortData ) +static int wxCALLBACK myCompareFunction( wxIntPtr aItem1, wxIntPtr aItem2, + wxIntPtr WXUNUSED( aSortData ) ) { wxString* component1Name = (wxString*) aItem1; wxString* component2Name = (wxString*) aItem2; @@ -247,5 +248,5 @@ static int wxCALLBACK MyCompareFunction( wxIntPtr aItem1, wxIntPtr aItem2, wxInt void EDA_LIST_DIALOG::sortList() { - m_listBox->SortItems( MyCompareFunction, 0 ); + m_listBox->SortItems( myCompareFunction, 0 ); } diff --git a/eeschema/eeschema_id.h b/eeschema/eeschema_id.h index 98c3282e7a..ca8eeeb88c 100644 --- a/eeschema/eeschema_id.h +++ b/eeschema/eeschema_id.h @@ -120,7 +120,7 @@ enum id_eeschema_frm ID_POPUP_SCH_END_SHEET, ID_POPUP_SCH_RESIZE_SHEET, ID_POPUP_SCH_CLEANUP_SHEET, - ID_POPUP_IMPORT_GLABEL, + ID_POPUP_IMPORT_HLABEL_TO_SHEETPIN, ID_POPUP_SCH_GENERIC_ORIENT_CMP, ID_POPUP_SCH_GENERIC_EDIT_CMP, ID_POPUP_SCH_EDIT_CONVERT_CMP, diff --git a/eeschema/onrightclick.cpp b/eeschema/onrightclick.cpp index 047dfa7248..442e2412ea 100644 --- a/eeschema/onrightclick.cpp +++ b/eeschema/onrightclick.cpp @@ -787,7 +787,7 @@ void AddMenusForHierchicalSheet( wxMenu* PopMenu, SCH_SHEET* Sheet ) AddMenuItem( PopMenu, ID_POPUP_SCH_RESIZE_SHEET, _( "Resize Sheet" ), KiBitmap( resize_sheet_xpm ) ); PopMenu->AppendSeparator(); - AddMenuItem( PopMenu, ID_POPUP_IMPORT_GLABEL, _( "Import Sheet Pins" ), + AddMenuItem( PopMenu, ID_POPUP_IMPORT_HLABEL_TO_SHEETPIN, _( "Import Sheet Pins" ), KiBitmap( import_hierarchical_label_xpm ) ); if( Sheet->HasUndefinedPins() ) // Sheet has pin labels, and can be cleaned diff --git a/eeschema/sch_sheet.h b/eeschema/sch_sheet.h index 0efbd6694d..3304a0d751 100644 --- a/eeschema/sch_sheet.h +++ b/eeschema/sch_sheet.h @@ -106,10 +106,10 @@ public: /** * Virtual function IsMovableFromAnchorPoint * Return true for items which are moved with the anchor point at mouse cursor - * and false for items moved with no reference to anchor - * @return false for a hierarchical sheet pin + * and false for items moved with no reference to anchor (usually large items) + * @return true for a hierarchical sheet pin */ - bool IsMovableFromAnchorPoint() { return false; } + bool IsMovableFromAnchorPoint() { return true; } void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, GR_DRAWMODE aDrawMode, EDA_COLOR_T aColor = UNSPECIFIED_COLOR ); diff --git a/eeschema/sch_sheet_pin.cpp b/eeschema/sch_sheet_pin.cpp index e3218c8532..b6febf9c07 100644 --- a/eeschema/sch_sheet_pin.cpp +++ b/eeschema/sch_sheet_pin.cpp @@ -161,14 +161,16 @@ enum SCH_SHEET_PIN::SHEET_SIDE SCH_SHEET_PIN::GetEdge() const void SCH_SHEET_PIN::ConstrainOnEdge( wxPoint Pos ) { - SCH_SHEET* Sheet = (SCH_SHEET*) GetParent(); + SCH_SHEET* sheet = (SCH_SHEET*) GetParent(); - if( Sheet == NULL ) + if( sheet == NULL ) return; + wxPoint center = sheet->m_pos + ( sheet->m_size / 2 ); + if( m_edge == SHEET_LEFT_SIDE || m_edge == SHEET_RIGHT_SIDE ) { - if( Pos.x > ( Sheet->m_pos.x + ( Sheet->m_size.x / 2 ) ) ) + if( Pos.x > center.x ) { SetEdge( SHEET_RIGHT_SIDE ); } @@ -179,15 +181,15 @@ void SCH_SHEET_PIN::ConstrainOnEdge( wxPoint Pos ) m_Pos.y = Pos.y; - if( m_Pos.y < Sheet->m_pos.y ) - m_Pos.y = Sheet->m_pos.y; + if( m_Pos.y < sheet->m_pos.y ) + m_Pos.y = sheet->m_pos.y; - if( m_Pos.y > (Sheet->m_pos.y + Sheet->m_size.y) ) - m_Pos.y = Sheet->m_pos.y + Sheet->m_size.y; + if( m_Pos.y > (sheet->m_pos.y + sheet->m_size.y) ) + m_Pos.y = sheet->m_pos.y + sheet->m_size.y; } else /* vertical sheetpin*/ { - if( Pos.y > ( Sheet->m_pos.y + ( Sheet->m_size.y / 2 ) ) ) + if( Pos.y > center.y ) { SetEdge( SHEET_BOTTOM_SIDE ); //bottom } @@ -198,12 +200,15 @@ void SCH_SHEET_PIN::ConstrainOnEdge( wxPoint Pos ) m_Pos.x = Pos.x; - if( m_Pos.x < Sheet->m_pos.x ) - m_Pos.x = Sheet->m_pos.x; + if( m_Pos.x < sheet->m_pos.x ) + m_Pos.x = sheet->m_pos.x; - if( m_Pos.x > (Sheet->m_pos.x + Sheet->m_size.x) ) - m_Pos.x = Sheet->m_pos.x + Sheet->m_size.x; + if( m_Pos.x > (sheet->m_pos.x + sheet->m_size.x) ) + m_Pos.x = sheet->m_pos.x + sheet->m_size.x; } + + printf( "centre %d %d, pos %d %d, pinpos %d %d, edge %d\n", + center.x, center.y, Pos.x, Pos.y, m_Pos.x, m_Pos.y, m_edge); } diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp index f7a8ae4736..b30c9b9c97 100644 --- a/eeschema/schedit.cpp +++ b/eeschema/schedit.cpp @@ -77,7 +77,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_POPUP_SCH_CLEANUP_SHEET: case ID_POPUP_SCH_END_SHEET: case ID_POPUP_SCH_RESIZE_SHEET: - case ID_POPUP_IMPORT_GLABEL: + case ID_POPUP_IMPORT_HLABEL_TO_SHEETPIN: case ID_POPUP_SCH_INIT_CMP: case ID_POPUP_SCH_DISPLAYDOC_CMP: case ID_POPUP_SCH_EDIT_CONVERT_CMP: @@ -242,7 +242,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) screen->TestDanglingEnds( m_canvas, &dc ); break; - case ID_POPUP_IMPORT_GLABEL: + case ID_POPUP_IMPORT_HLABEL_TO_SHEETPIN: if( item != NULL && item->Type() == SCH_SHEET_T ) screen->SetCurItem( ImportSheetPin( (SCH_SHEET*) item, &dc ) ); break; @@ -772,10 +772,10 @@ void SCH_EDIT_FRAME::PrepareMoveItem( SCH_ITEM* aItem, wxDC* aDC ) else aItem->SetStoredPos( GetCrossHairPosition() - aItem->GetPosition() ); - OnModify(); - m_canvas->SetMouseCapture( moveItemWithMouseCursor, abortMoveItem ); + GetScreen()->SetCurItem( aItem ); + m_canvas->SetMouseCapture( moveItemWithMouseCursor, abortMoveItem ); m_canvas->Refresh(); } diff --git a/include/dialog_env_var_config.h b/include/dialog_env_var_config.h index 9d83788f5e..7705e54108 100644 --- a/include/dialog_env_var_config.h +++ b/include/dialog_env_var_config.h @@ -45,6 +45,7 @@ private: protected: virtual void OnAddRow( wxCommandEvent& aEvent ); virtual void OnDeleteSelectedRows( wxCommandEvent& aEvent ); + virtual void OnHelpRequest( wxCommandEvent& aEvent ); public: DIALOG_ENV_VAR_CONFIG( wxWindow* parent, const ENV_VAR_MAP& aEnvVarMap ); diff --git a/pcbnew/dialogs/dialog_freeroute_exchange.cpp b/pcbnew/dialogs/dialog_freeroute_exchange.cpp index 51b8736490..9740f37a32 100644 --- a/pcbnew/dialogs/dialog_freeroute_exchange.cpp +++ b/pcbnew/dialogs/dialog_freeroute_exchange.cpp @@ -44,9 +44,6 @@ #endif -#define FREEROUTE_RUN_KEY wxT( "freeroute_command" ) - - void PCB_EDIT_FRAME::Access_to_External_Tool( wxCommandEvent& event ) { DIALOG_FREEROUTE dialog( this ); @@ -68,28 +65,16 @@ DIALOG_FREEROUTE::DIALOG_FREEROUTE( PCB_EDIT_FRAME* parent ): -/* Specific data initialization - */ - +// Specific data initialization void DIALOG_FREEROUTE::MyInit() { SetFocus(); m_freeRouterFound = false; -/* wxString msg; - wxConfigBase* cfg = Kiface().KifaceSettings(); - cfg->Read( FREEROUTE_RUN_KEY, &msg ); -*/ wxFileName fileName( FindKicadFile( wxT( "freeroute.jar" ) ), wxPATH_UNIX ); if( fileName.FileExists() ) - { m_freeRouterFound = true; - m_buttonLaunchFreeroute->SetLabel( _("Create .dsn File and Launch FreeRouter") ); - } - - else - m_buttonLaunchFreeroute->SetLabel( _("Create .dsn File") ); m_buttonLaunchFreeroute->Enable( m_freeRouterFound ); @@ -98,6 +83,7 @@ void DIALOG_FREEROUTE::MyInit() const char * s_FreeRouteHelpInfo = #include ; + void DIALOG_FREEROUTE::OnHelpButtonClick( wxCommandEvent& event ) { DIALOG_DISPLAY_HTML_TEXT_BASE help_Dlg( this, wxID_ANY, @@ -108,16 +94,13 @@ void DIALOG_FREEROUTE::OnHelpButtonClick( wxCommandEvent& event ) help_Dlg.ShowModal(); } -/* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CREATE_EXPORT_DSN_FILE - */ + void DIALOG_FREEROUTE::OnExportButtonClick( wxCommandEvent& event ) { m_Parent->ExportToSpecctra( event ); } -/* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_IMPORT_FREEROUTE_DSN_FILE - */ void DIALOG_FREEROUTE::OnImportButtonClick( wxCommandEvent& event ) { m_Parent->ImportSpecctraSession( event ); @@ -130,8 +113,7 @@ void DIALOG_FREEROUTE::OnImportButtonClick( wxCommandEvent& event ) } -/* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RUN_FREEROUTE - */ +// Run freeroute, if it is available (freeroute.jar found in kicad binaries) void DIALOG_FREEROUTE::OnLaunchButtonClick( wxCommandEvent& event ) { wxString dsnFile; @@ -224,17 +206,3 @@ const wxString DIALOG_FREEROUTE::createDSN_File() } - -/* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE - */ -void DIALOG_FREEROUTE::OnCancelButtonClick( wxCommandEvent& event ) -{ - EndModal(wxID_CANCEL); -} - - -void DIALOG_FREEROUTE::OnOKButtonClick( wxCommandEvent& event ) -{ - EndModal(wxID_OK); -} - diff --git a/pcbnew/dialogs/dialog_freeroute_exchange.h b/pcbnew/dialogs/dialog_freeroute_exchange.h index 7debe7bee2..1484a6f6c5 100644 --- a/pcbnew/dialogs/dialog_freeroute_exchange.h +++ b/pcbnew/dialogs/dialog_freeroute_exchange.h @@ -35,12 +35,10 @@ private: private: // Virtual event handlers - void OnOKButtonClick( wxCommandEvent& event ); void OnExportButtonClick( wxCommandEvent& event ); void OnLaunchButtonClick( wxCommandEvent& event ); void OnImportButtonClick( wxCommandEvent& event ); void OnHelpButtonClick( wxCommandEvent& event ); - void OnCancelButtonClick( wxCommandEvent& event ); void MyInit ( ); const wxString createDSN_File(); diff --git a/pcbnew/dialogs/dialog_freeroute_exchange_base.cpp b/pcbnew/dialogs/dialog_freeroute_exchange_base.cpp index 1d0f7db859..411028523a 100644 --- a/pcbnew/dialogs/dialog_freeroute_exchange_base.cpp +++ b/pcbnew/dialogs/dialog_freeroute_exchange_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Mar 9 2015) +// C++ code generated with wxFormBuilder (version Jun 17 2015) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -22,11 +22,11 @@ DIALOG_FREEROUTE_BASE::DIALOG_FREEROUTE_BASE( wxWindow* parent, wxWindowID id, c wxBoxSizer* bLeftSizer; bLeftSizer = new wxBoxSizer( wxVERTICAL ); - m_staticText2 = new wxStaticText( this, wxID_ANY, _("Export/Import to/from FreeRoute:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText2->Wrap( -1 ); - m_staticText2->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); + m_staticTextMsg = new wxStaticText( this, wxID_ANY, _("Export/Import to/from FreeRoute:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextMsg->Wrap( -1 ); + m_staticTextMsg->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); - bLeftSizer->Add( m_staticText2, 0, wxALL, 5 ); + bLeftSizer->Add( m_staticTextMsg, 0, wxALL, 5 ); wxBoxSizer* bLeftSubSizerSizer; bLeftSubSizerSizer = new wxBoxSizer( wxHORIZONTAL ); @@ -37,17 +37,17 @@ DIALOG_FREEROUTE_BASE::DIALOG_FREEROUTE_BASE( wxWindow* parent, wxWindowID id, c wxBoxSizer* bLeftButtonsSizer; bLeftButtonsSizer = new wxBoxSizer( wxVERTICAL ); - m_ExportDSN = new wxButton( this, ID_BUTTON_EXPORT_DSN, _("Export a Specctra Design (*.dsn) File"), wxDefaultPosition, wxDefaultSize, 0 ); + m_ExportDSN = new wxButton( this, wxID_ANY, _("Export a Specctra Design (*.dsn) File"), wxDefaultPosition, wxDefaultSize, 0 ); m_ExportDSN->SetToolTip( _("Export a Specctra DSN file (to FreeRouter)") ); bLeftButtonsSizer->Add( m_ExportDSN, 0, wxALL|wxEXPAND, 5 ); - m_buttonLaunchFreeroute = new wxButton( this, wxID_BUTTON_LAUNCH, _("Export a Specctra Design and Launch FreeRoute"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonLaunchFreeroute = new wxButton( this, wxID_ANY, _("Export a Specctra Design and Launch FreeRoute"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonLaunchFreeroute->SetToolTip( _("FreeRouter can be run only if freeroute.jar is found in Kicad binaries folder") ); bLeftButtonsSizer->Add( m_buttonLaunchFreeroute, 0, wxALL|wxEXPAND, 5 ); - m_buttonImport = new wxButton( this, wxID_BUTTON_IMPORT, _("Back Import the Specctra Session (*.ses) File"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonImport = new wxButton( this, wxID_ANY, _("Back Import the Specctra Session (*.ses) File"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonImport->SetToolTip( _("Merge a session file created by FreeRouter with the current board.") ); bLeftButtonsSizer->Add( m_buttonImport, 0, wxALL|wxEXPAND, 5 ); @@ -87,9 +87,7 @@ DIALOG_FREEROUTE_BASE::DIALOG_FREEROUTE_BASE( wxWindow* parent, wxWindowID id, c m_ExportDSN->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FREEROUTE_BASE::OnExportButtonClick ), NULL, this ); m_buttonLaunchFreeroute->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FREEROUTE_BASE::OnLaunchButtonClick ), NULL, this ); m_buttonImport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FREEROUTE_BASE::OnImportButtonClick ), NULL, this ); - m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FREEROUTE_BASE::OnCancelButtonClick ), NULL, this ); m_sdbSizerHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FREEROUTE_BASE::OnHelpButtonClick ), NULL, this ); - m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FREEROUTE_BASE::OnOKButtonClick ), NULL, this ); } DIALOG_FREEROUTE_BASE::~DIALOG_FREEROUTE_BASE() @@ -98,8 +96,6 @@ DIALOG_FREEROUTE_BASE::~DIALOG_FREEROUTE_BASE() m_ExportDSN->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FREEROUTE_BASE::OnExportButtonClick ), NULL, this ); m_buttonLaunchFreeroute->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FREEROUTE_BASE::OnLaunchButtonClick ), NULL, this ); m_buttonImport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FREEROUTE_BASE::OnImportButtonClick ), NULL, this ); - m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FREEROUTE_BASE::OnCancelButtonClick ), NULL, this ); m_sdbSizerHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FREEROUTE_BASE::OnHelpButtonClick ), NULL, this ); - m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FREEROUTE_BASE::OnOKButtonClick ), NULL, this ); } diff --git a/pcbnew/dialogs/dialog_freeroute_exchange_base.fbp b/pcbnew/dialogs/dialog_freeroute_exchange_base.fbp index 77659f1f2b..d1d7913e78 100644 --- a/pcbnew/dialogs/dialog_freeroute_exchange_base.fbp +++ b/pcbnew/dialogs/dialog_freeroute_exchange_base.fbp @@ -151,7 +151,7 @@ 0 1 - m_staticText2 + m_staticTextMsg 1 @@ -254,7 +254,7 @@ 0 0 - ID_BUTTON_EXPORT_DSN + wxID_ANY Export a Specctra Design (*.dsn) File 0 @@ -342,7 +342,7 @@ 0 0 - wxID_BUTTON_LAUNCH + wxID_ANY Export a Specctra Design and Launch FreeRoute 0 @@ -430,7 +430,7 @@ 0 0 - wxID_BUTTON_IMPORT + wxID_ANY Back Import the Specctra Session (*.ses) File 0 @@ -592,11 +592,11 @@ m_sdbSizer protected - OnCancelButtonClick + OnHelpButtonClick - OnOKButtonClick + diff --git a/pcbnew/dialogs/dialog_freeroute_exchange_base.h b/pcbnew/dialogs/dialog_freeroute_exchange_base.h index 867db8e5c6..b6e14dcdc0 100644 --- a/pcbnew/dialogs/dialog_freeroute_exchange_base.h +++ b/pcbnew/dialogs/dialog_freeroute_exchange_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Mar 9 2015) +// C++ code generated with wxFormBuilder (version Jun 17 2015) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -27,9 +27,6 @@ class DIALOG_SHIM; /////////////////////////////////////////////////////////////////////////// -#define ID_BUTTON_EXPORT_DSN 1000 -#define wxID_BUTTON_LAUNCH 1001 -#define wxID_BUTTON_IMPORT 1002 /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_FREEROUTE_BASE @@ -39,7 +36,7 @@ class DIALOG_FREEROUTE_BASE : public DIALOG_SHIM private: protected: - wxStaticText* m_staticText2; + wxStaticText* m_staticTextMsg; wxButton* m_ExportDSN; wxButton* m_buttonLaunchFreeroute; wxButton* m_buttonImport; @@ -53,9 +50,7 @@ class DIALOG_FREEROUTE_BASE : public DIALOG_SHIM virtual void OnExportButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnLaunchButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnImportButtonClick( wxCommandEvent& event ) { event.Skip(); } - virtual void OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnHelpButtonClick( wxCommandEvent& event ) { event.Skip(); } - virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); } public: