Commit 8497178f authored by charras's avatar charras

removed unused files. Switch to RC5

parent 52dbb13c
/* XPM */
#ifndef XPMMAIN
extern const char * icon_python_xpm[];
#else
const char * icon_python_xpm[] = {
"32 32 72 1",
" c None",
". c #7EA5C6",
"+ c #6495BD",
"@ c #4383B6",
"# c #437FB2",
"$ c #6491B5",
"% c #7DA1BF",
"& c #3882BE",
"* c #387CB5",
"= c #3779AF",
"- c #3776AB",
"; c #4988BB",
"> c #CDDFEE",
", c #F7F7FF",
"' c #82ADD1",
") c #3773A5",
"! c #7096B5",
"~ c #4385BB",
"{ c #FFFFFF",
"] c #F6F5F5",
"^ c #3C729E",
"/ c #9BBDDA",
"( c #366D9C",
"_ c #387FBA",
": c #5A91BF",
"< c #376A94",
"[ c #FFED60",
"} c #FFE659",
"| c #F8E16E",
"1 c #FFEB5E",
"2 c #FFE354",
"3 c #4489C0",
"4 c #3885C3",
"5 c #FFDB4C",
"6 c #FBCE47",
"7 c #FFD544",
"8 c #72A0C5",
"9 c #507CA1",
"0 c #FFE052",
"a c #FFD040",
"b c #F5D98D",
"c c #7F9EB8",
"d c #F1ECDA",
"e c #FFCC3B",
"f c #FBC840",
"g c #FBD54F",
"h c #FCC539",
"i c #4379A7",
"j c #DCE1E7",
"k c #FAE262",
"l c #FFC532",
"m c #FBC037",
"n c #80A6C6",
"o c #FFBC29",
"p c #F7CD74",
"q c #427DAE",
"r c #FABE40",
"s c #FFB521",
"t c #497FAC",
"u c #FFCD57",
"v c #FFE097",
"w c #FFD67B",
"x c #FFD849",
"y c #FFFBF2",
"z c #F7DE92",
"A c #FFCF6A",
"B c #FFEDC8",
"C c #FFE4AC",
"D c #F7D284",
"E c #FFB531",
"F c #F7D47B",
"G c #FDBE2E",
" ",
" ",
" .+@###$% ",
" &&&**==--- ",
" ;&>,'*===))))! ",
" ~&{{]==--))))^ ",
" &&'/@===)))((( ",
" __**===)))(((( ",
" ((((( ",
" :&&&**====)))(((<<[[}}| ",
" &&&&&**===)))(((<<<11}22 ",
" 34&__***---))(((<<<<222556 ",
" 4&&&**====)))((<<<<<225557 ",
" 84&&***==--))(((<<<<900577ab ",
" ~&&&**===)))(((<<<<cd5577aef ",
" ___**====)))((<<<<9dg577eeeh ",
" __***==ijk[[[[[}225557aeelll ",
" @_**===j|[[[[[}}00577aeelllm ",
" n*==---k[[[[}}225577aellllop ",
" **=---}[[[[}225577eelllloo ",
" q===))[[[[}225577aeellloor ",
" --)))[[}}00577aeelllooos ",
" tiii11}005566fffffmmmmp ",
" 22255 ",
" 225557aeelllom ",
" 00557aeeeuvwoo ",
" gx77aeelly{{sm ",
" z77aellllABCsD ",
" 6ellloossE ",
" FmGoop ",
" ",
" "};
#endif
/* XPM */
#ifndef XPMMAIN
extern const char * icon_python_small_xpm[];
#else
const char *icon_python_small_xpm[] = {
"16 16 98 2",
" c None",
". c #5490C0",
"+ c #3E7EB4",
"@ c #3D7CB0",
"# c #5488B2",
"$ c #4686BB",
"% c #8FB8DA",
"& c #DCE6F1",
"* c #377AB0",
"= c #3778AD",
"- c #3773A5",
"; c #5684AA",
"> c #3880BC",
", c #4A8AC0",
"' c #538DBD",
") c #3779AF",
"! c #3774A8",
"~ c #3772A3",
"{ c #366D9C",
"] c #366C9A",
"^ c #799785",
"/ c #FFEA5C",
"( c #FCE464",
"_ c #3883BF",
": c #387EB7",
"< c #387AB1",
"[ c #366E9E",
"} c #376A94",
"| c #9BA876",
"1 c #FFE658",
"2 c #FFDF50",
"3 c #4B8EC4",
"4 c #3882BE",
"5 c #387AB2",
"6 c #3778AE",
"7 c #3775A9",
"8 c #A1AA77",
"9 c #FFDE50",
"0 c #FFD848",
"a c #FCD55B",
"b c #3B81BB",
"c c #3880BB",
"d c #387BB4",
"e c #3776AA",
"f c #376B96",
"g c #7E9CB2",
"h c #FADE70",
"i c #FFD646",
"j c #FFCF3E",
"k c #FDC93C",
"l c #3B80B9",
"m c #387CB5",
"n c #6393BB",
"o c #F3E486",
"p c #FFED60",
"q c #FFE85B",
"r c #FFE253",
"s c #FFDA4A",
"t c #FFD545",
"u c #FFCD3C",
"v c #FFC734",
"w c #FEC433",
"x c #508ABB",
"y c #3776AB",
"z c #9AAD84",
"A c #FFE558",
"B c #FFE152",
"C c #FFD342",
"D c #FFCB3A",
"E c #FFC532",
"F c #FFC330",
"G c #FCC242",
"H c #9BB082",
"I c #FFEB5E",
"J c #FFE659",
"K c #FFE052",
"L c #FFD241",
"M c #FFC02E",
"N c #FFBA27",
"O c #4379A7",
"P c #C0C273",
"Q c #FFDE4F",
"R c #FFDB4C",
"S c #FFD040",
"T c #FFCC3B",
"U c #FFCE54",
"V c #FFC540",
"W c #FDBE30",
"X c #F9DA70",
"Y c #FFD645",
"Z c #FFC836",
"` c #FFEEC9",
" . c #FFD37B",
".. c #F9C95E",
"+. c #FCCC4D",
"@. c #FEC232",
"#. c #FFBC29",
"$. c #FCBD3D",
" ",
" . + @ # ",
" $ % & * = - - ; ",
" > , ' ) ! ~ { { ",
" { ] ^ / ( ",
" _ > : < = - [ ] } | 1 2 ",
" 3 4 : 5 6 7 ~ { } } 8 9 0 a ",
" b c d ) e - { f } g h i j k ",
" l m * n o p p q r s t u v w ",
" x * y z p p A B s C D E F G ",
" = ! H I J K 0 L D v M N ",
" O P 1 Q R ",
" r 9 s S T U V W ",
" X Y S Z E ` ... ",
" +.@.#.$. ",
" "
};
#endif
/* XPM */
#ifndef XPMMAIN
extern const char * new_python_xpm[];
#else
const char * new_python_xpm[] = {
"16 16 112 2",
" c None",
". c #000000",
"+ c #FEFEFE",
"@ c #090909",
"# c #EEEEEE",
"$ c #F1F1F1",
"% c #FBFBFB",
"& c #DAE2E8",
"* c #CDDBE7",
"= c #528DBD",
"- c #3C7BB0",
"; c #5689B2",
"> c #DAE1E7",
", c #E9EBED",
"' c #767676",
") c #5590C1",
"! c #79A9D1",
"~ c #709FC6",
"{ c #3777AC",
"] c #3672A4",
"^ c #3C73A2",
"/ c #B2C4D4",
"( c #161616",
"_ c #C1D2E1",
": c #C2D3E2",
"< c #BFD0DE",
"[ c #BBCCDB",
"} c #366E9D",
"| c #467695",
"1 c #C4C787",
"2 c #F8E78A",
"3 c #C4C4C4",
"4 c #B7CDDF",
"5 c #3881BD",
"6 c #387EB7",
"7 c #3779B0",
"8 c #3775A9",
"9 c #366F9F",
"0 c #366B99",
"a c #597F89",
"b c #DACF62",
"c c #FFDF50",
"d c #EEEDEC",
"e c #ECECEC",
"f c #4287C0",
"g c #387EB8",
"h c #377AB1",
"i c #3776AB",
"j c #366D9B",
"k c #386A94",
"l c #728F8F",
"m c #E6CF5B",
"n c #FFD545",
"o c #F8D774",
"p c #EBEBEB",
"q c #3A7FB9",
"r c #377BB4",
"s c #4E86B5",
"t c #A8B890",
"u c #AEBA7A",
"v c #AEB674",
"w c #AFB26D",
"x c #DCC969",
"y c #FED348",
"z c #FFCA38",
"A c #F8CE5E",
"B c #EAEAEA",
"C c #4784B7",
"D c #3778AD",
"E c #88A38E",
"F c #FDEC63",
"G c #FFE95C",
"H c #FFE254",
"I c #FFDA4A",
"J c #FFD140",
"K c #FFC836",
"L c #FFC330",
"M c #F7CA65",
"N c #E8E8E8",
"O c #C1D1DE",
"P c #457EAE",
"Q c #95AB84",
"R c #FFE95B",
"S c #FBDB5F",
"T c #FBD55E",
"U c #FACE56",
"V c #FAC851",
"W c #FAC249",
"X c #E7E7E7",
"Y c #B9C9D7",
"Z c #D4CD6F",
"` c #FFE152",
" . c #FFD949",
".. c #F4D881",
"+. c #F1DA9F",
"@. c #F1D494",
"#. c #E9DFC6",
"$. c #E6E6E6",
"%. c #E5E5E5",
"&. c #F8DD79",
"*. c #FFD646",
"=. c #FFCE3D",
"-. c #FFC735",
";. c #FFE5AA",
">. c #FDCC64",
",. c #ECD9AF",
"'. c #E4E4E4",
"). c #F0E8D3",
"!. c #FBC94A",
"~. c #FDBF36",
"{. c #F9C150",
"]. c #E3E3E3",
" . . . . . . . . . . . . ",
". + + + + + + + + + + @ + . ",
". + # # # $ $ $ $ $ $ @ % + . ",
". + # # & * = - ; > , @ ' + + . ",
". + # # ) ! ~ { ] ^ / @ @ @ ( . ",
". + # # _ : < [ } | 1 2 # # 3 . ",
". + 4 5 6 7 8 9 0 a b c d e 3 . ",
". + f g h i ] j k l m n o p 3 . ",
". + q r s t u v w x y z A B 3 . ",
". + C D E F G H I J K L M N 3 . ",
". + O P Q R H S T U V W X X 3 . ",
". + # Y Z ` ...+.@.#.$.$.%.3 . ",
". + # # &.*.=.-.;.>.,.%.'.'.3 . ",
". + # # # ).!.~.{.# '.].].].3 . ",
". 3 3 3 3 3 3 3 3 3 3 3 3 3 3 . ",
" . . . . . . . . . . . . . . "};
#endif
......@@ -6,7 +6,7 @@
#endif
#ifndef KICAD_BUILD_VERSION
#define KICAD_BUILD_VERSION "(2010-02-26)"
#define KICAD_BUILD_VERSION "(2010-02-28)"
#endif
#define VERSION_STABILITY "RC5"
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/****************************/
/* pyhandler.h */
/****************************/
#ifndef PYHANDLER_H
#define PYHANDLER_H
#include <wx/string.h>
#include <Python.h>
#include <wx/wxPython/wxPython.h>
#include <vector>
/* Use the boost library : */
#include <boost/python.hpp>
class PyHandler
{
typedef void (*initfunc_t )();
private:
static PyHandler* m_instance;
bool m_ModulesLoaded;
int m_current;
PyThreadState* m_mainTState;
protected:
PyHandler();
wxString m_appName;
void RunBaseScripts( const wxString& base );
// Modules
struct ModuleRecord
{
wxString name;
std::vector< initfunc_t > registry;
ModuleRecord( const wxString &modName ) :
name( modName )
{
}
};
std::vector< ModuleRecord > m_ModuleRegistry;
void DoInitModules();
// Events
struct Event
{
wxString key;
std::vector< boost::python::object > functors;
Event( const wxString &strKey ) :
key( strKey )
{
}
};
std::vector< Event > m_EventRegistry;
public:
// Singleton handling:
static PyHandler* GetInstance();
~PyHandler();
// Scope params/handling:
void SetAppName( const wxString& name );
void AddToModule( const wxString& name, initfunc_t initfunc );
int GetModuleIndex( const wxString& name ) const;
// Script and direct call
void RunScripts();
bool RunScript( const wxString& name );
bool RunSimpleString( const wxString& code );
// Common Informations
const char* GetVersion();
void InitNextModule();
// Event triggering
// - C++ interface
void DeclareEvent( const wxString& key );
void TriggerEvent( const wxString& key );
void TriggerEvent( const wxString& key,
const boost::python::object& param );
int GetEventIndex( const wxString& key );
// - Py Interface
void RegisterCallback( const wxString& key,
const boost::python::object& obj );
void UnRegisterCallback( const wxString& key,
const boost::python::object& obj );
// Object conversions
// - Py -> C++
static wxString MakeStr( const boost::python::object& objStr );
// - C++ -> Py
static boost::python::object Convert( const wxString& wxStr );
};
#define KICAD_PY_BIND_MODULE( mod ) PyHandler::GetInstance()->AddModule( init # mod )
#endif //PYHANDLER_H
No preview for this file type
This diff is collapsed.
/*****************************************************************************/
/**
* @file kicad.cpp
* @brief Main kicad library manager file
*/
/*****************************************************************************/
#ifdef __GNUG__
#pragma implementation
#endif
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "common.h"
#include "bitmaps.h"
#include "colors.h"
#include "kicad.h"
#include "macros.h"
#ifdef KICAD_PYTHON
#include <pyhandler.h>
#endif
/* Import functions */
char* GetFileName( char* FullPathName );
#ifdef KICAD_PYTHON
using namespace boost::python;
/*****************************************************************************/
// Global functions:
/*****************************************************************************/
static WinEDA_MainFrame& GetMainFrame()
{
return *( wxGetApp().m_MainFrame );
}
static void WinEDAPrint( str msg )
{
GetMainFrame().PrintMsg( PyHandler::MakeStr( msg ) + wxT( "\n" ) );
}
static void WinEDAClear()
{
GetMainFrame().ClearMsg();
}
static object GetTypeExt( enum TreeFileType type )
{
return PyHandler::Convert( TREE_PROJECT_FRAME::GetFileExt( type ) );
}
/*****************************************************************************/
// WinEDA_MainFrame Special binding functions:
// (one line functions are simple wrappers)
/*****************************************************************************/
object WinEDA_MainFrame::GetPrjName() const
{
return PyHandler::Convert( m_PrjFileName );
}
object WinEDA_MainFrame::ToWx()
{
return object( handle<>( borrowed( wxPyMake_wxObject( this, false ) ) ) );
}
TREE_PROJECT_FRAME* WinEDA_MainFrame::GetTree() const
{
return m_LeftWin;
}
/**
* @brief TODO
*/
/*****************************************************************************/
void WinEDA_MainFrame::AddFastLaunchPy( object& button )
/*****************************************************************************/
{
wxBitmapButton* btn;
bool success = wxPyConvertSwigPtr( button.ptr(),
(void**) &btn, _T( "wxBitmapButton" ) );
if( !success )
return;
Py_INCREF( button.ptr() );
btn->Reparent( m_CommandWin );
m_CommandWin->AddFastLaunch( btn );
}
/*****************************************************************************/
// TREE_PROJECT_FRAME Special binding functions:
// (one line functions are simple wrappers)
/*****************************************************************************/
// TODO To WxWidgets ?
object TREE_PROJECT_FRAME::ToWx()
{
return object( handle<>( borrowed( wxPyMake_wxObject( this, false ) ) ) );
}
// TODO Get ?
object TREE_PROJECT_FRAME::GetFtExPy( enum TreeFileType type ) const
{
return PyHandler::Convert( GetFileExt( type ) );
}
// Get python menu
object TREE_PROJECT_FRAME::GetMenuPy( enum TreeFileType type )
{
return object( handle<>( borrowed( wxPyMake_wxObject( GetContextMenu( (int) type ), false ) ) ) );
}
// Get tree control
object TREE_PROJECT_FRAME::GetTreeCtrl()
{
return object( handle<>( borrowed( wxPyMake_wxObject( m_TreeProject, false ) ) ) );
}
// Get current menu
object TREE_PROJECT_FRAME::GetCurrentMenu()
{
return object( handle<>( borrowed( wxPyMake_wxObject( m_PopupMenu, false ) ) ) );
}
/**
* @brief TODO
*/
/*****************************************************************************/
void TREE_PROJECT_FRAME::NewFilePy( const str& name,
enum TreeFileType type,
object& id )
/*****************************************************************************/
{
wxTreeItemId root;
if( !wxPyConvertSwigPtr( id.ptr(), (void**) &root, _T( "wxTreeItemId" ) ) )
return;
NewFile( PyHandler::MakeStr( name ), type, root );
}
/**
* @brief Add a file to the tree under root, or m_root if conversion is wrong
*/
/*****************************************************************************/
void TREE_PROJECT_FRAME::AddFilePy( const str& file, object& root )
/*****************************************************************************/
{
wxTreeItemId* theroot = &m_root;
if( !wxPyConvertSwigPtr( root.ptr(), (void**) &root, _T( "wxTreeItemId" ) ) )
{
theroot = &m_root;
}
AddFile( PyHandler::MakeStr( file ), *theroot );
}
/**
* @brief convert wxTreeItem into TREEPROJECT_ITEM
*/
/*****************************************************************************/
TREEPROJECT_ITEM* TREE_PROJECT_FRAME::GetItemData( const object& item )
/*****************************************************************************/
{
wxTreeItemId* id = NULL;
if( !wxPyConvertSwigPtr( item.ptr(), (void**) &id, _T( "wxTreeItemId" ) ) )
{
return NULL;
}
return dynamic_cast<TREEPROJECT_ITEM*>( m_TreeProject->GetItemData( *id ) );
}
/*****************************************************************************/
// TREEPROJECT_ITEM Special binding functions
// (one line functions are simple wrappers)
/*****************************************************************************/
// Python rename
bool TREEPROJECT_ITEM::RenamePy( const str& newname, bool check )
{
return Rename( PyHandler::MakeStr( newname ), check );
}
// Get python directory
object TREEPROJECT_ITEM::GetDirPy() const
{
return PyHandler::Convert( GetDir() );
}
// Get python filename
object TREEPROJECT_ITEM::GetFileNamePy() const
{
return PyHandler::Convert( GetFileName() );
}
// Get python menu
object TREEPROJECT_ITEM::GetMenuPy()
{
return object( handle<>( borrowed( wxPyMake_wxObject( &m_fileMenu, false ) ) ) );
}
/**
* @brief KiCad python module init, \n
* This function is called from PyHandler to init the kicad module
*/
/*****************************************************************************/
static void py_kicad_init()
/*****************************************************************************/
{
def( "GetMainFrame", &GetMainFrame,
return_value_policy< reference_existing_object >() );
def( "GetTypeExtension", &GetTypeExt );
class_<TREEPROJECT_ITEM>( "PrjItem" )
// Internal data:
.def( "GetFileName", &TREEPROJECT_ITEM::GetFileNamePy )
.def( "GetDir", &TREEPROJECT_ITEM::GetDirPy )
.def( "GetType", &TREEPROJECT_ITEM::GetType )
.def( "GetId", &TREEPROJECT_ITEM::GetIdPy )
.def( "GetMenu", &TREEPROJECT_ITEM::GetMenuPy )
// Item control
.def( "SetState", &TREEPROJECT_ITEM::SetState )
.def( "Rename", &TREEPROJECT_ITEM::RenamePy )
.def( "Move", &TREEPROJECT_ITEM::Move )
.def( "Delete", &TREEPROJECT_ITEM::Delete )
.def( "Activate", &TREEPROJECT_ITEM::Activate )
;
enum_<TreeFileType>( "FileType" )
.value( "PROJECT", TREE_PROJECT )
.value( "SCHEMA", TREE_SCHEMA )
.value( "BOARD", TREE_PCB )
.value( "PYSCRIPT", TREE_PY )
.value( "GERBER", TREE_GERBER )
.value( "PDF", TREE_PDF )
.value( "TXT", TREE_TXT )
.value( "NETLIST", TREE_NET )
.value( "UNKNOWN", TREE_UNKNOWN )
.value( "DIRECTORY", TREE_DIRECTORY )
.value( "MAX", TREE_MAX );
class_<TREE_PROJECT_FRAME>( "TreeWindow" )
// wx Interface
.def( "ToWx", &TREE_PROJECT_FRAME::ToWx )
// common features
.def( "GetContextMenu", &TREE_PROJECT_FRAME::GetMenuPy )
.def( "GetFileExtension", &TREE_PROJECT_FRAME::GetFtExPy )
// file filters control
.def( "AddFilter", &TREE_PROJECT_FRAME::AddFilter )
.def( "ClearFilters", &TREE_PROJECT_FRAME::ClearFilters )
.def( "RemoveFilter", &TREE_PROJECT_FRAME::RemoveFilterPy )
.def( "GetFilters", &TREE_PROJECT_FRAME::GetFilters,
return_value_policy < copy_const_reference >() )
.def( "GetCurrentMenu", &TREE_PROJECT_FRAME::GetCurrentMenu )
/** Project tree control **/
// AddState
.def( "AddState",
&TREE_PROJECT_FRAME::AddStatePy )
// GetTreeCtrl
.def( "GetTreeCtrl",
&TREE_PROJECT_FRAME::GetTreeCtrl )
// GetItemData
.def( "GetItemData",
&TREE_PROJECT_FRAME::GetItemData,
return_value_policy < reference_existing_object >() )
// FindItemData
.def( "FindItemData",
&TREE_PROJECT_FRAME::FindItemData,
return_value_policy < reference_existing_object >() )
// NewFile
.def( "NewFile",
&TREE_PROJECT_FRAME::NewFilePy )
// AddFile
.def( "AddFile",
&TREE_PROJECT_FRAME::AddFilePy )
; /* ENDOF class_<TREE_PROJECT_FRAME>( "TreeWindow" ) */
class_<WinEDA_MainFrame>( "MainFrame" )
// Wx interface
.def( "ToWx", &WinEDA_MainFrame::ToWx )
// Common controls
.def( "AddFastLaunch", &WinEDA_MainFrame::AddFastLaunchPy )
.def( "Refresh", &WinEDA_MainFrame::OnRefreshPy )
.def( "GetProjectName", &WinEDA_MainFrame::GetPrjName )
.def( "GetProjectWindow", &WinEDA_MainFrame::GetTree,
return_value_policy< reference_existing_object >() );
}
/**
* @brief Common python module init
*/
/*****************************************************************************/
static void py_common_init()
/*****************************************************************************/
{
def( "Print", &WinEDAPrint );
def( "Clear", &WinEDAClear );
}
#endif
This diff is collapsed.
This diff is collapsed.
/**********************************************/
/* vi_edit.cpp: some editing function for vias */
/**********************************************/
#include "fctsys.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "pcbnew.h"
#include "wxPcbStruct.h"
#include "class_board_design_settings.h"
#include "pcbnew_id.h"
/**********************************************************************************/
void WinEDA_PcbFrame::Via_Edit_Control( wxCommandEvent& event )
/**********************************************************************************/
/*
* Execute edit commands relative to vias
*/
{
TRACK* via_struct;
SEGVIA* via = (SEGVIA*) GetCurItem();
wxClientDC dc( DrawPanel );
DrawPanel->CursorOff( &dc );
DrawPanel->PrepareGraphicContext( &dc );
wxASSERT( via->Type() == TYPE_VIA);
PICKED_ITEMS_LIST itemsListPicker;
ITEM_PICKER picker( NULL, UR_CHANGED );
switch( event.GetId() )
{
case ID_POPUP_PCB_VIA_HOLE_TO_VALUE: // Set the via drill to custom
if( (GetBoard()->GetCurrentViaDrill() > 0) &&
(GetBoard()->GetCurrentViaDrill() < via->m_Width) )
{
SaveCopyInUndoList(via, UR_CHANGED);
via->Draw( DrawPanel, &dc, GR_XOR );
via->SetDrillValue( GetBoard()->GetCurrentViaDrill() );
via->Draw( DrawPanel, &dc, GR_OR );
GetScreen()->SetModify();
}
else
DisplayError( this, _( "Incorrect value for Via drill. No via drill change" ) );
break;
case ID_POPUP_PCB_VIA_HOLE_EXPORT_TO_OTHERS: // Export the current drill value to via which have the same size
via_struct = GetBoard()->m_Track;
for( ; via_struct != NULL; via_struct = via_struct->Next() )
{
if( via_struct->Type() == TYPE_VIA ) /* mise a jour du diametre de la via */
{
if( via_struct->m_Width != via->m_Width )
continue;
picker.m_PickedItem = via_struct;
picker.m_Link = via_struct->Copy();
itemsListPicker.PushItem(picker);
via_struct->Draw( DrawPanel, &dc, GR_XOR );
via_struct->SetDrillValue( via->GetDrillValue() );
via_struct->Draw( DrawPanel, &dc, GR_OR );
}
}
SaveCopyInUndoList(itemsListPicker, UR_CHANGED);
GetScreen()->SetModify();
break;
case ID_POPUP_PCB_VIA_HOLE_TO_DEFAULT:
SaveCopyInUndoList(via, UR_CHANGED);
via->Draw( DrawPanel, &dc, GR_XOR );
via->SetDrillDefault();
via->Draw( DrawPanel, &dc, GR_OR );
GetScreen()->SetModify();
break;
case ID_POPUP_PCB_VIA_HOLE_RESET_TO_DEFAULT: // Reset all via drill to default value
via_struct = GetBoard()->m_Track;
for( ; via_struct != NULL; via_struct = via_struct->Next() )
{
if( via_struct->Type() == TYPE_VIA ) /* Update via drill */
{
if( ! via_struct->IsDrillDefault() )
{
picker.m_PickedItem = via_struct;
picker.m_Link = via_struct->Copy();
itemsListPicker.PushItem(picker);
via_struct->Draw( DrawPanel, &dc, GR_XOR );
via_struct->SetDrillDefault();
via_struct->Draw( DrawPanel, &dc, GR_OR );
}
}
}
SaveCopyInUndoList(itemsListPicker, UR_CHANGED);
GetScreen()->SetModify();
break;
case ID_POPUP_PCB_VIA_HOLE_ENTER_VALUE: // Enter a new alternate value for drill via
wxMessageBox( wxT( "WinEDA_PcbFrame::Via_Edit_Control(): obsolete command" ) );
break;
default:
wxMessageBox( wxT( "WinEDA_PcbFrame::Via_Edit_Control() error: unknown command" ) );
break;
}
DrawPanel->CursorOn( &dc );
DrawPanel->MouseToCursorSchema();
}
......@@ -577,7 +577,7 @@ void WinEDA_PcbFrame::RecreateCmpFileFromBoard( wxCommandEvent& aEvent )
wildcard = _( "Component files (." ) + NetCmpExtBuffer + wxT( ")|*." ) +
NetCmpExtBuffer;
wxFileDialog dlg( this, _( "Save Component Files" ), wxEmptyString,
wxFileDialog dlg( this, _( "Save Component Files" ), wxGetCwd(),
fn.GetFullName(), wildcard,
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
......
release version:
2010 feb 26
2010 feb 28
files (.zip,.tgz):
kicad-2010-02-26-RC5
kicad-2010-02-28-RC5
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment