This patch enables use of the new (kiface) footprint selector in the "Exchange Footprints" dialog.
As suggested in this bug report: https://bugs.launchpad.net/kicad/+bug/1464821 I'll look into making this change in the module editor as well, but that will require more work. -- Chris
commit 6f3c07f0835898bb4cc022b45c586c4aecaef4b2 Author: Chris Pavlina <cpavl...@binghamton.edu> Date: Sun Jun 14 16:28:06 2015 -0400 Use new footprint selector for "Change Footprints" diff --git a/pcbnew/xchgmod.cpp b/pcbnew/xchgmod.cpp index 3ae43b8..a481419 100644 --- a/pcbnew/xchgmod.cpp +++ b/pcbnew/xchgmod.cpp @@ -43,6 +43,7 @@ #include <pcbnew.h> #include <dialog_exchange_modules_base.h> #include <wildcards_and_files_ext.h> +#include <kiway.h> #include <boost/bind.hpp> #include <tool/tool_manager.h> @@ -95,14 +96,14 @@ void PCB_EDIT_FRAME::InstallExchangeModuleFrame( MODULE* Module ) { DIALOG_EXCHANGE_MODULE dialog( this, Module ); - dialog.ShowModal(); + dialog.ShowQuasiModal(); } void DIALOG_EXCHANGE_MODULE::OnQuit( wxCommandEvent& event ) { m_selectionMode = m_Selection->GetSelection(); - EndModal( 0 ); + EndQuasiModal( wxID_CANCEL ); } @@ -507,11 +508,14 @@ void DIALOG_EXCHANGE_MODULE::BrowseAndSelectFootprint( wxCommandEvent& event ) { wxString newname; - newname = m_parent->SelectFootprint( m_parent, wxEmptyString, wxEmptyString, wxEmptyString, - Prj().PcbFootprintLibs() ); + KIWAY_PLAYER* frame = Kiway().Player( FRAME_PCB_MODULE_VIEWER_MODAL, true ); - if( newname != wxEmptyString ) + if( frame->ShowModal( &newname, this ) ) + { m_NewModule->SetValue( newname ); + } + + frame->Destroy(); }
_______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp