Commit d73e1324 authored by charras's avatar charras

See changelog

parent 80e03c8c
...@@ -6,6 +6,24 @@ Please add newer entries at the top, list the date and your name with ...@@ -6,6 +6,24 @@ Please add newer entries at the top, list the date and your name with
email address. email address.
2009-Feb-6 Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
Added a forgotten contributor (Tim Hanson) to kicad contributor list.
++pcbnew:
Zoom factors in 1.5 progression, and limited to 18 values
(near to to Wayne Stambaugh's changes: 15 values are not enought for pcbnew)
removed minor problems in zoom box selection (removed blank line).
Added user grid selection in modedit and refinements when user grid is selected.
TODO:
more refinements in user grid mode.
new grid implementation does not used floats when user grid is selected to calculate coordinates.
so it is unable to handle a metric grid. Todo: see what happened.
++eeschema:
Zoom factors in 1.5 progression, and limited to 15 values according to Wayne Stambaugh's changes.
2009-Feb-05 UPDATE Wayne Stambaugh <stambaughw@verizon.net> 2009-Feb-05 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
================================================================================ ================================================================================
++All ++All
......
...@@ -113,6 +113,7 @@ void InitKiCadAbout( wxAboutDialogInfo& info ) ...@@ -113,6 +113,7 @@ void InitKiCadAbout( wxAboutDialogInfo& info )
info.AddDeveloper( SetMsg( wxT( "Jonas Diemer <diemer@gmx.de>" ) ) ); info.AddDeveloper( SetMsg( wxT( "Jonas Diemer <diemer@gmx.de>" ) ) );
info.AddDeveloper( SetMsg( wxT( "KBool Library <http://boolean.klaasholwerda.nl/bool.html>" ) ) ); info.AddDeveloper( SetMsg( wxT( "KBool Library <http://boolean.klaasholwerda.nl/bool.html>" ) ) );
info.AddDeveloper( SetMsg( wxT( "Rok Markovic <rok@kanardia.eu>" ) ) ); info.AddDeveloper( SetMsg( wxT( "Rok Markovic <rok@kanardia.eu>" ) ) );
info.AddDeveloper( SetMsg( wxT( "Tim Hanson <sideskate@gmail.com>" ) ) );
info.AddDeveloper( SetMsg( wxT( "Vesa Solonen <vesa.solonen@hut.fi>" ) ) ); info.AddDeveloper( SetMsg( wxT( "Vesa Solonen <vesa.solonen@hut.fi>" ) ) );
info.AddDeveloper( SetMsg( wxT( "Wayne Stambaugh <stambaughw@verizon.net>" ) ) ); info.AddDeveloper( SetMsg( wxT( "Wayne Stambaugh <stambaughw@verizon.net>" ) ) );
......
...@@ -310,6 +310,7 @@ void BASE_SCREEN::SetGrid( const wxSize& size ) ...@@ -310,6 +310,7 @@ void BASE_SCREEN::SetGrid( const wxSize& size )
size_t i; size_t i;
wxSize nearest_grid = m_GridList[0].m_Size;
for( i = 0; i < m_GridList.GetCount(); i++ ) for( i = 0; i < m_GridList.GetCount(); i++ )
{ {
if( m_GridList[i].m_Size == size ) if( m_GridList[i].m_Size == size )
...@@ -317,9 +318,13 @@ void BASE_SCREEN::SetGrid( const wxSize& size ) ...@@ -317,9 +318,13 @@ void BASE_SCREEN::SetGrid( const wxSize& size )
m_Grid = m_GridList[i].m_Size; m_Grid = m_GridList[i].m_Size;
return; return;
} }
// keep trace of the nearest grill size, if the exact size is not found
if ( size.x < m_GridList[i].m_Size.x )
nearest_grid = m_GridList[i].m_Size;
} }
m_Grid = m_GridList[0].m_Size; m_Grid = nearest_grid;
wxLogWarning( _( "Grid size( %d, %d ) not in grid list, falling back to " \ wxLogWarning( _( "Grid size( %d, %d ) not in grid list, falling back to " \
"grid size( %d, %d )." ), "grid size( %d, %d )." ),
......
...@@ -2,7 +2,7 @@ EXTRACPPFLAGS += -I$(SYSINCLUDE) -I./ -Ibitmaps -I../include ...@@ -2,7 +2,7 @@ EXTRACPPFLAGS += -I$(SYSINCLUDE) -I./ -Ibitmaps -I../include
COMMON = ../include/colors.h COMMON = ../include/colors.h
PCBINCL = -I../pcbnew -I../polygon
OBJECTS= \ OBJECTS= \
about_kicad.o\ about_kicad.o\
...@@ -39,13 +39,79 @@ OBJECTS= \ ...@@ -39,13 +39,79 @@ OBJECTS= \
worksheet.o\ worksheet.o\
base_screen.o\ base_screen.o\
dcsvg.o\ dcsvg.o\
zoom.o zoom.o\
basepcbframe.o\
class_board.o\
class_board_connected_item.o\
class_cotation.o\
class_drc_item.o\
class_marker.o\
class_mire.o\
class_pad.o\
class_pad_draw_functions.o\
class_pcb_text.o\
class_zone.o\
class_zone_setting.o\
classpcb.o\
collectors.o\
sel_layer.o\
dialog_print_using_printer_base.o
ifdef KICAD_PYTHON ifdef KICAD_PYTHON
OBJECTS += pyhandler.o OBJECTS += pyhandler.o
pyhandler.o: pyhandler.cpp $(COMMON) ../include/pyhandler.h pyhandler.o: pyhandler.cpp $(COMMON) ../include/pyhandler.h
endif endif
basepcbframe.o: ../pcbnew/basepcbframe.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_board.o: ../pcbnew/class_board.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_board_connected_item.o: ../pcbnew/class_board_connected_item.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_cotation.o: ../pcbnew/class_cotation.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_drc_item.o: ../pcbnew/class_drc_item.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_marker.o: ../pcbnew/class_marker.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_mire.o: ../pcbnew/class_mire.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_pad.o: ../pcbnew/class_pad.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_pad_draw_functions.o: ../pcbnew/class_pad_draw_functions.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_pcb_text.o: ../pcbnew/class_pcb_text.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_zone.o: ../pcbnew/class_zone.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_zone_setting.o: ../pcbnew/class_zone_setting.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
classpcb.o: ../pcbnew/classpcb.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
collectors.o: ../pcbnew/collectors.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
sel_layer.o: ../pcbnew/sel_layer.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
dialog_print_using_printer_base.o: ../pcbnew/dialog_print_using_printer_base.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
gr_basic.o: gr_basic.cpp ../include/gr_basic.h $(DEPEND) gr_basic.o: gr_basic.cpp ../include/gr_basic.h $(DEPEND)
confirm.o: confirm.cpp $(COMMON) confirm.o: confirm.cpp $(COMMON)
......
...@@ -13,16 +13,10 @@ LIBVIEWER3D = ../3d-viewer/3d-viewer.a ...@@ -13,16 +13,10 @@ LIBVIEWER3D = ../3d-viewer/3d-viewer.a
OBJECTS = $(TARGET).o \ OBJECTS = $(TARGET).o \
class_cvpcb.o\ class_cvpcb.o\
class_zone.o\
class_zone_setting.o\
class_board_connected_item.o\
class_board_item.o\ class_board_item.o\
memoire.o \ memoire.o \
cvframe.o\ cvframe.o\
listboxes.o\ listboxes.o\
class_pcb_text.o\
class_cotation.o\
class_mire.o\
displayframe.o\ displayframe.o\
init.o\ init.o\
readschematicnetlist.o\ readschematicnetlist.o\
...@@ -39,18 +33,12 @@ OBJECTS = $(TARGET).o \ ...@@ -39,18 +33,12 @@ OBJECTS = $(TARGET).o \
setvisu.o\ setvisu.o\
dialog_display_options.o\ dialog_display_options.o\
tracemod.o \ tracemod.o \
classpcb.o \
class_drawsegment.o \ class_drawsegment.o \
class_board.o \
class_module.o \ class_module.o \
class_pad.o \
class_pad_draw_functions.o\
class_text_mod.o \ class_text_mod.o \
class_edge_mod.o \ class_edge_mod.o \
class_equipot.o \ class_equipot.o \
class_track.o\ class_track.o
basepcbframe.o\
collectors.o
cvpcb.o: cvpcb.cpp cvpcb.h cvpcb.o: cvpcb.cpp cvpcb.h
...@@ -67,30 +55,9 @@ memoire.o: memoire.cpp ...@@ -67,30 +55,9 @@ memoire.o: memoire.cpp
rdpcad.o: rdpcad.cpp rdpcad.o: rdpcad.cpp
classpcb.o: ../pcbnew/classpcb.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_mire.o: ../pcbnew/class_mire.cpp ../pcbnew/class_mire.h $(COMMON)
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_board_connected_item.o: ../pcbnew/class_board_connected_item.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_board_item.o: ../pcbnew/class_board_item.cpp class_board_item.o: ../pcbnew/class_board_item.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp $(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_zone.o: ../pcbnew/class_zone.cpp ../pcbnew/class_zone.h $(COMMON)
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_zone_setting.o: ../pcbnew/class_zone_setting.cpp ../pcbnew/class_zone_setting.h $(COMMON)
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_cotation.o: ../pcbnew/class_cotation.cpp ../pcbnew/class_cotation.h $(COMMON)
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_pcb_text.o: ../pcbnew/class_pcb_text.cpp ../pcbnew/class_pcb_text.h $(COMMON)
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_board.o: ../pcbnew/class_board.cpp class_board.o: ../pcbnew/class_board.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp $(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
...@@ -100,12 +67,6 @@ class_drawsegment.o: ../pcbnew/class_drawsegment.cpp ../pcbnew/class_drawsegment ...@@ -100,12 +67,6 @@ class_drawsegment.o: ../pcbnew/class_drawsegment.cpp ../pcbnew/class_drawsegment
class_track.o: ../pcbnew/class_track.cpp class_track.o: ../pcbnew/class_track.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp $(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_pad.o: ../pcbnew/class_pad.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_pad_draw_functions.o: ../pcbnew/class_pad_draw_functions.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_module.o: ../pcbnew/class_module.cpp class_module.o: ../pcbnew/class_module.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp $(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
...@@ -118,12 +79,6 @@ class_edge_mod.o: ../pcbnew/class_edge_mod.cpp ...@@ -118,12 +79,6 @@ class_edge_mod.o: ../pcbnew/class_edge_mod.cpp
class_equipot.o: ../pcbnew/class_equipot.cpp class_equipot.o: ../pcbnew/class_equipot.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp $(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
basepcbframe.o: ../pcbnew/basepcbframe.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
collectors.o: ../pcbnew/collectors.cpp $(COMMON)
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
readschematicnetlist.o: readschematicnetlist.cpp readschematicnetlist.o: readschematicnetlist.cpp
viewlogi.o: viewlogi.cpp viewlogi.o: viewlogi.cpp
......
...@@ -79,8 +79,11 @@ void SCH_ITEM::Place( WinEDA_SchematicFrame* frame, wxDC* DC ) ...@@ -79,8 +79,11 @@ void SCH_ITEM::Place( WinEDA_SchematicFrame* frame, wxDC* DC )
/* Class SCH_SCREEN: classe de gestion d'un affichage pour schematique */ /* Class SCH_SCREEN: classe de gestion d'un affichage pour schematique */
/***********************************************************************/ /***********************************************************************/
/* Default EESchema zoom values. 3th root of 2 series up to 32 */ /* Default EESchema zoom values. Limited to 15 values to keep a decent size to menus */
static int SchematicZoomList[] = { 10, 13, 16, 20, 25, 32, 40, 50, 63, 80, 101, 127, 160, 202, 254, 320, 640, 1280 }; static int SchematicZoomList[] =
{
10, 15, 20, 30, 40, 60, 80, 120, 160, 230, 320, 480, 640, 800, 1280
};
#define SCHEMATIC_ZOOM_LIST_CNT ( sizeof( SchematicZoomList ) / \ #define SCHEMATIC_ZOOM_LIST_CNT ( sizeof( SchematicZoomList ) / \
sizeof( int ) ) sizeof( int ) )
......
...@@ -9,30 +9,20 @@ EXTRACPPFLAGS= -DGERBVIEW -DPCBNEW -fno-strict-aliasing\ ...@@ -9,30 +9,20 @@ EXTRACPPFLAGS= -DGERBVIEW -DPCBNEW -fno-strict-aliasing\
OBJECTS= \ OBJECTS= \
$(TARGET).o\ $(TARGET).o\
classpcb.o\
class_zone.o\
class_zone_setting.o\
select_layers_to_pcb.o\ select_layers_to_pcb.o\
sel_layer.o\
lay2plot.o\ lay2plot.o\
dialog_print_using_printer_base.o \
dialog_print_using_printer.o \ dialog_print_using_printer.o \
edit.o \ edit.o \
setpage.o \ setpage.o \
tool_gerber.o \ tool_gerber.o \
gerberframe.o\ gerberframe.o\
onrightclick.o\ onrightclick.o\
class_board.o\
class_board_item.o\ class_board_item.o\
class_drawsegment.o\ class_drawsegment.o\
class_track.o \ class_track.o \
class_drc_item.o \
class_board_connected_item.o\
set_color.o \ set_color.o \
gerbview_config.o \ gerbview_config.o \
class_marker.o \
tracepcb.o \ tracepcb.o \
class_pcb_text.o\
trpiste.o \ trpiste.o \
reglage.o \ reglage.o \
options.o \ options.o \
...@@ -49,9 +39,7 @@ OBJECTS= \ ...@@ -49,9 +39,7 @@ OBJECTS= \
files.o\ files.o\
block.o\ block.o\
controle.o\ controle.o\
basepcbframe.o\ export_to_pcbnew.o
export_to_pcbnew.o\
collectors.o
setpage.o: ../share/setpage.cpp setpage.o: ../share/setpage.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../share/$*.cpp $(CXX) -c $(EDACPPFLAGS) -o $@ ../share/$*.cpp
...@@ -59,51 +47,15 @@ setpage.o: ../share/setpage.cpp ...@@ -59,51 +47,15 @@ setpage.o: ../share/setpage.cpp
drawframe.o: ../share/drawframe.cpp drawframe.o: ../share/drawframe.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../share/$*.cpp $(CXX) -c $(EDACPPFLAGS) -o $@ ../share/$*.cpp
class_board_connected_item.o: ../pcbnew/class_board_connected_item.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_board_item.o: ../pcbnew/class_board_item.cpp class_board_item.o: ../pcbnew/class_board_item.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp $(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_marker.o: ../pcbnew/class_marker.cpp ../pcbnew/class_marker.h
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_zone.o: ../pcbnew/class_zone.cpp ../pcbnew/class_zone.h
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_zone_setting.o: ../pcbnew/class_zone_setting.cpp ../pcbnew/class_zone_setting.h
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_drawsegment.o: ../pcbnew/class_drawsegment.cpp ../pcbnew/class_drawsegment.h $(DEPEND) class_drawsegment.o: ../pcbnew/class_drawsegment.cpp ../pcbnew/class_drawsegment.h $(DEPEND)
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp $(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_drc_item.o: ../pcbnew/class_drc_item.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
sel_layer.o: ../pcbnew/sel_layer.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
dialog_print_using_printer_base.o: ../pcbnew/dialog_print_using_printer_base.cpp ../pcbnew/dialog_print_using_printer_base.h
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
dialog_print_using_printer.o: ../pcbnew/dialog_print_using_printer.cpp ../pcbnew/dialog_print_using_printer_base.h dialog_print_using_printer.o: ../pcbnew/dialog_print_using_printer.cpp ../pcbnew/dialog_print_using_printer_base.h
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp $(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
classpcb.o: ../pcbnew/classpcb.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_pcb_text.o: ../pcbnew/class_pcb_text.cpp ../pcbnew/class_pcb_text.h
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_board.o: ../pcbnew/class_board.cpp $(DEPEND)
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
basepcbframe.o: ../pcbnew/basepcbframe.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
collectors.o: ../pcbnew/collectors.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_track.o: ../pcbnew/class_track.cpp class_track.o: ../pcbnew/class_track.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp $(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
......
...@@ -9,7 +9,7 @@ COMMON_GLOBL wxString g_BuildVersion ...@@ -9,7 +9,7 @@ COMMON_GLOBL wxString g_BuildVersion
# include "config.h" # include "config.h"
(wxT(KICAD_SVN_VERSION)) (wxT(KICAD_SVN_VERSION))
# else # else
(wxT("(20090201-unstable)")) /* main program version */ (wxT("(20090206-unstable)")) /* main program version */
# endif # endif
#endif #endif
; ;
...@@ -20,7 +20,7 @@ COMMON_GLOBL wxString g_BuildAboutVersion ...@@ -20,7 +20,7 @@ COMMON_GLOBL wxString g_BuildAboutVersion
# include "config.h" # include "config.h"
(wxT(KICAD_ABOUT_VERSION)) (wxT(KICAD_ABOUT_VERSION))
# else # else
(wxT("(20090201-unstable)")) /* svn date & rev (normally overridden) */ (wxT("(20090206-unstable)")) /* svn date & rev (normally overridden) */
# endif # endif
#endif #endif
; ;
......
...@@ -218,9 +218,10 @@ enum main_id { ...@@ -218,9 +218,10 @@ enum main_id {
* than 15 entries in a context submenu may get too large to display * than 15 entries in a context submenu may get too large to display
* cleanly. Add any additional popup zoom IDs above here or the * cleanly. Add any additional popup zoom IDs above here or the
* zoom event handler will not work properly. * zoom event handler will not work properly.
* currently set to 18. This is a compromise for pcbnew. For schematic 15 is enought
*/ */
ID_POPUP_ZOOM_LEVEL_START, ID_POPUP_ZOOM_LEVEL_START,
ID_POPUP_ZOOM_LEVEL_END = ID_POPUP_ZOOM_LEVEL_START + 15, ID_POPUP_ZOOM_LEVEL_END = ID_POPUP_ZOOM_LEVEL_START + 18,
ID_POPUP_ZOOM_END_RANGE, // last zoom id ID_POPUP_ZOOM_END_RANGE, // last zoom id
ID_POPUP_GRID_PLUS, ID_POPUP_GRID_PLUS,
......
...@@ -916,6 +916,7 @@ public: ...@@ -916,6 +916,7 @@ public:
void OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct ); void OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct );
void Show3D_Frame( wxCommandEvent& event ); void Show3D_Frame( wxCommandEvent& event );
void GeneralControle( wxDC* DC, wxPoint Mouse ); void GeneralControle( wxDC* DC, wxPoint Mouse );
virtual void OnSelectGrid( wxCommandEvent& event );
/* handlers for block commands */ /* handlers for block commands */
int ReturnBlockCommand( int key ); int ReturnBlockCommand( int key );
......
...@@ -12,8 +12,16 @@ ...@@ -12,8 +12,16 @@
#include "id.h" #include "id.h"
// mostly 1.5 factor, seems to work well. /* Default pcbnew zoom values.
static const int PcbZoomList[] = { 5, 8, 12, 18, 27, 40, 60, 90, 140, 200, 300, 450, 700, 1000, 1500, 2250, 4500, 9000, 20480 }; * Limited to 18 values to keep a decent size to menus
* 15 it better but does not allow a sufficient number of values
* roughtly a 1.5 progression.
* The last 2 values is handy when somebody uses a library import of a module
* (or foreign data) which has a bad coordinate
* Also useful in Gerbview for this reason.
*/
static const int PcbZoomList[] = { 10, 15, 22, 30, 45, 70, 100, 150, 220, 350, 500, 800, 1200,
2000, 3500, 5000, 10000, 20000 };
#define PCB_ZOOM_LIST_CNT ( sizeof( PcbZoomList ) / sizeof( int ) ) #define PCB_ZOOM_LIST_CNT ( sizeof( PcbZoomList ) / sizeof( int ) )
...@@ -37,11 +45,10 @@ static GRID_TYPE PcbGridList[] = { ...@@ -37,11 +45,10 @@ static GRID_TYPE PcbGridList[] = {
#define PCB_GRID_LIST_CNT ( sizeof( PcbGridList ) / sizeof( GRID_TYPE ) ) #define PCB_GRID_LIST_CNT ( sizeof( PcbGridList ) / sizeof( GRID_TYPE ) )
/**************************************************/ /*******************************************************************/
/* Class SCREEN: classe de gestion d'un affichage */ /* Class PCB_SCREEN: class to handle parametres to display a board */
/***************************************************/ /********************************************************************/
/* Constructeur de SCREEN */ PCB_SCREEN::PCB_SCREEN() : BASE_SCREEN( TYPE_SCREEN )
PCB_SCREEN::PCB_SCREEN( ) : BASE_SCREEN( TYPE_SCREEN )
{ {
size_t i; size_t i;
...@@ -51,7 +58,7 @@ PCB_SCREEN::PCB_SCREEN( ) : BASE_SCREEN( TYPE_SCREEN ) ...@@ -51,7 +58,7 @@ PCB_SCREEN::PCB_SCREEN( ) : BASE_SCREEN( TYPE_SCREEN )
for( i = 0; i < PCB_GRID_LIST_CNT; i++ ) for( i = 0; i < PCB_GRID_LIST_CNT; i++ )
AddGrid( PcbGridList[i] ); AddGrid( PcbGridList[i] );
SetGrid( wxSize( 500, 500 ) ); /* pas de la grille en 1/10000 "*/ SetGrid( wxSize( 500, 500 ) ); /* Set the working grid size to a reasonnable value (in 1/10000 inch) */
Init(); Init();
} }
...@@ -62,22 +69,25 @@ PCB_SCREEN::~PCB_SCREEN() ...@@ -62,22 +69,25 @@ PCB_SCREEN::~PCB_SCREEN()
{ {
} }
/*************************/ /*************************/
void PCB_SCREEN::Init() void PCB_SCREEN::Init()
/*************************/ /*************************/
{ {
InitDatas(); InitDatas();
m_Active_Layer = COPPER_LAYER_N; /* ref couche active 0.. 31 */ m_Active_Layer = COPPER_LAYER_N; /* default active layer = bottom layer */
m_Route_Layer_TOP = CMP_N; /* ref couches par defaut pour vias (Cu.. Cmp) */ m_Route_Layer_TOP = CMP_N; /* default layers pair for vias (bottom to top) */
m_Route_Layer_BOTTOM = COPPER_LAYER_N; m_Route_Layer_BOTTOM = COPPER_LAYER_N;
m_Zoom = 128; /* valeur */ m_Zoom = 150; /* a default value for zoom */
} }
int PCB_SCREEN::GetInternalUnits( void ) int PCB_SCREEN::GetInternalUnits( void )
{ {
return PCB_INTERNAL_UNIT; return PCB_INTERNAL_UNIT;
} }
/* Return true if a microvia can be put on board /* Return true if a microvia can be put on board
* A microvia ia a small via restricted to 2 near neighbour layers * A microvia ia a small via restricted to 2 near neighbour layers
* because its is hole is made by laser which can penetrate only one layer * because its is hole is made by laser which can penetrate only one layer
......
...@@ -21,7 +21,7 @@ ZONE_FILES = zones_by_polygon.o zones_test_and_combine_areas.o\ ...@@ -21,7 +21,7 @@ ZONE_FILES = zones_by_polygon.o zones_test_and_combine_areas.o\
SPECCTRA_TOOLS = specctra.o specctra_export.o dsn.o specctra_import.o SPECCTRA_TOOLS = specctra.o specctra_export.o dsn.o specctra_import.o
OBJECTS= $(TARGET).o classpcb.o\ OBJECTS= $(TARGET).o\
$(ZONE_FILES)\ $(ZONE_FILES)\
$(SPECCTRA_TOOLS)\ $(SPECCTRA_TOOLS)\
print_board_functions.o\ print_board_functions.o\
...@@ -36,13 +36,11 @@ OBJECTS= $(TARGET).o classpcb.o\ ...@@ -36,13 +36,11 @@ OBJECTS= $(TARGET).o classpcb.o\
dialog_SVG_print.o\ dialog_SVG_print.o\
dialog_SVG_print_base.o\ dialog_SVG_print_base.o\
dialog_print_using_printer.o\ dialog_print_using_printer.o\
dialog_print_using_printer_base.o\
onrightclick.o\ onrightclick.o\
onleftclick.o\ onleftclick.o\
modedit_onclick.o\ modedit_onclick.o\
cross-probing.o\ cross-probing.o\
via_edit.o\ via_edit.o\
class_marker.o\
menubarpcb.o \ menubarpcb.o \
menubarmodedit.o \ menubarmodedit.o \
tool_onrightclick.o\ tool_onrightclick.o\
...@@ -52,21 +50,12 @@ OBJECTS= $(TARGET).o classpcb.o\ ...@@ -52,21 +50,12 @@ OBJECTS= $(TARGET).o classpcb.o\
pcbframe.o \ pcbframe.o \
class_drawsegment.o \ class_drawsegment.o \
class_track.o \ class_track.o \
class_mire.o\
class_cotation.o\ class_cotation.o\
class_pad.o \
class_pad_draw_functions.o\
class_equipot.o \ class_equipot.o \
class_module.o \ class_module.o \
class_edge_mod.o \ class_edge_mod.o \
class_text_mod.o\ class_text_mod.o\
class_pcb_text.o\
class_board_item.o\ class_board_item.o\
class_board_connected_item.o\
class_drc_item.o\
class_board.o\
class_zone.o\
class_zone_setting.o\
track.o \ track.o \
set_color.o \ set_color.o \
set_grid.o \ set_grid.o \
...@@ -111,7 +100,6 @@ OBJECTS= $(TARGET).o classpcb.o\ ...@@ -111,7 +100,6 @@ OBJECTS= $(TARGET).o classpcb.o\
gendrill.o\ gendrill.o\
gen_holes_and_tools_lists_for_drill.o\ gen_holes_and_tools_lists_for_drill.o\
gen_drill_report_files.o\ gen_drill_report_files.o\
sel_layer.o \
cotation.o\ cotation.o\
automove.o\ automove.o\
tr_modif.o \ tr_modif.o \
...@@ -131,13 +119,11 @@ OBJECTS= $(TARGET).o classpcb.o\ ...@@ -131,13 +119,11 @@ OBJECTS= $(TARGET).o classpcb.o\
tool_modedit.o\ tool_modedit.o\
moduleframe.o\ moduleframe.o\
find.o\ find.o\
basepcbframe.o\
modeditoptions.o\ modeditoptions.o\
gen_modules_placefile.o\ gen_modules_placefile.o\
modedit.o\ modedit.o\
export_gencad.o\ export_gencad.o\
hotkeys.o \ hotkeys.o \
collectors.o\
gpcb_exchange.o gpcb_exchange.o
...@@ -165,16 +151,8 @@ export_gencad.o: export_gencad.cpp ...@@ -165,16 +151,8 @@ export_gencad.o: export_gencad.cpp
print_board_functions.o: print_board_functions.cpp print_board_functions.o: print_board_functions.cpp
classpcb.o: classpcb.cpp
class_track.o: class_track.cpp class_track.h class_track.o: class_track.cpp class_track.h
class_mire.o: class_mire.cpp class_mire.h
class_cotation.o: class_cotation.cpp class_cotation.h
class_pad.o: class_pad.cpp
class_equipot.o: class_equipot.cpp class_equipot.o: class_equipot.cpp
class_module.o: class_module.cpp class_module.o: class_module.cpp
...@@ -183,8 +161,6 @@ class_edge_mod.o: class_edge_mod.cpp ...@@ -183,8 +161,6 @@ class_edge_mod.o: class_edge_mod.cpp
class_text_mod.o: class_text_mod.cpp class_text_mod.o: class_text_mod.cpp
class_pcb_text.o: class_pcb_text.cpp class_pcb_text.h
pcbnew.o: pcbnew.cpp pcbnew.h pcbplot.h drag.h \ pcbnew.o: pcbnew.cpp pcbnew.h pcbplot.h drag.h \
autorout.h ../include/eda_dde.h autorout.h ../include/eda_dde.h
...@@ -315,4 +291,3 @@ dragsegm.o: dragsegm.cpp drag.h ...@@ -315,4 +291,3 @@ dragsegm.o: dragsegm.cpp drag.h
router.o: router.cpp router.o: router.cpp
collectors.o: collectors.cpp collectors.h
...@@ -195,7 +195,11 @@ WinEDA_ModuleEditFrame::WinEDA_ModuleEditFrame( wxWindow* father, ...@@ -195,7 +195,11 @@ WinEDA_ModuleEditFrame::WinEDA_ModuleEditFrame( wxWindow* father,
GridSize.x = SizeX; GridSize.x = SizeX;
GridSize.y = SizeY; GridSize.y = SizeY;
} }
} }
GetScreen()->AddGrid( g_UserGrid, g_UserGrid_Unit, ID_POPUP_GRID_USER );
GetScreen()->SetGrid( GridSize ); GetScreen()->SetGrid( GridSize );
SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
...@@ -353,14 +357,18 @@ void WinEDA_ModuleEditFrame::SetToolbars() ...@@ -353,14 +357,18 @@ void WinEDA_ModuleEditFrame::SetToolbars()
unsigned jj; unsigned jj;
if( m_SelZoomBox ) if( m_SelZoomBox )
{ {
for( jj = 0; jj < (int)GetScreen()->m_ZoomList.GetCount(); jj++ ) bool not_found = true;
for( jj = 0; jj < GetScreen()->m_ZoomList.GetCount(); jj++ )
{ {
if( GetScreen()->GetZoom() == GetScreen()->m_ZoomList[jj] ) if( GetScreen()->GetZoom() == GetScreen()->m_ZoomList[jj] )
{ {
m_SelZoomBox->SetSelection( jj + 1 ); m_SelZoomBox->SetSelection( jj + 1 );
not_found = false;
break; break;
} }
} }
if ( not_found )
m_SelZoomBox->SetSelection( -1 );
} }
if( m_SelGridBox && GetScreen() ) if( m_SelGridBox && GetScreen() )
...@@ -493,3 +501,25 @@ void WinEDA_ModuleEditFrame::GeneralControle( wxDC* DC, wxPoint Mouse ) ...@@ -493,3 +501,25 @@ void WinEDA_ModuleEditFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
SetToolbars(); SetToolbars();
Affiche_Status_Box(); /* Affichage des coord curseur */ Affiche_Status_Box(); /* Affichage des coord curseur */
} }
/*****************************************************************/
void WinEDA_ModuleEditFrame::OnSelectGrid( wxCommandEvent& event )
/******************************************************************/
// Virtual function
{
if( m_SelGridBox == NULL )
return; // Should not occurs
GetScreen()->AddGrid( g_UserGrid, g_UserGrid_Unit, ID_POPUP_GRID_USER );
WinEDA_DrawFrame::OnSelectGrid( event );
// If the user grid is the current selection , ensure grid size value = new user grid value
int ii = m_SelGridBox->GetSelection();
if ( ii == (int)(m_SelGridBox->GetCount() - 1) )
{
GetScreen()->SetGrid( ID_POPUP_GRID_USER );
DrawPanel->Refresh();
}
}
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
#define INSETUP TRUE #define INSETUP TRUE
static int Pcbdiv_grille; /* memorisation temporaire */
/* Liste des parametres */ /* Liste des parametres */
static PARAM_CFG_WXSTRING UserLibDirBufCfg static PARAM_CFG_WXSTRING UserLibDirBufCfg
...@@ -745,13 +743,6 @@ static PARAM_CFG_INT UserGrilleUnitCfg ...@@ -745,13 +743,6 @@ static PARAM_CFG_INT UserGrilleUnitCfg
0, 1 /* Min and max values*/ 0, 1 /* Min and max values*/
); );
static PARAM_CFG_INT DivGrillePcbCfg
(
wxT( "DivGrPc" ), /* Keyword */
&Pcbdiv_grille, /* Parameter address */
1, /* Default value */
1, 10 /* Min and max values*/
);
static PARAM_CFG_INT TimeOutCfg //Duree entre Sauvegardes auto en secondes static PARAM_CFG_INT TimeOutCfg //Duree entre Sauvegardes auto en secondes
( (
...@@ -905,7 +896,6 @@ PARAM_CFG_BASE* ParamCfgList[] = ...@@ -905,7 +896,6 @@ PARAM_CFG_BASE* ParamCfgList[] =
&UserGrilleXCfg, &UserGrilleXCfg,
&UserGrilleYCfg, &UserGrilleYCfg,
&UserGrilleUnitCfg, &UserGrilleUnitCfg,
&DivGrillePcbCfg,
&TimeOutCfg, &TimeOutCfg,
&DisplPolairCfg, &DisplPolairCfg,
&CursorShapeCfg, &CursorShapeCfg,
......
...@@ -543,14 +543,18 @@ void WinEDA_PcbFrame::SetToolbars() ...@@ -543,14 +543,18 @@ void WinEDA_PcbFrame::SetToolbars()
if( m_SelZoomBox ) if( m_SelZoomBox )
{ {
bool not_found = true;
for( jj = 0; jj < (int)GetScreen()->m_ZoomList.GetCount(); jj++ ) for( jj = 0; jj < (int)GetScreen()->m_ZoomList.GetCount(); jj++ )
{ {
if( GetScreen()->GetZoom() == GetScreen()->m_ZoomList[jj] ) if( GetScreen()->GetZoom() == GetScreen()->m_ZoomList[jj] )
{ {
m_SelZoomBox->SetSelection( jj + 1 ); m_SelZoomBox->SetSelection( jj + 1 );
not_found = false;
break; break;
} }
} }
if ( not_found )
m_SelZoomBox->SetSelection( -1 );
} }
if( m_SelGridBox && GetScreen() ) if( m_SelGridBox && GetScreen() )
......
...@@ -31,11 +31,15 @@ void WinEDA_PcbGridFrame::AcceptPcbOptions(wxCommandEvent& event) ...@@ -31,11 +31,15 @@ void WinEDA_PcbGridFrame::AcceptPcbOptions(wxCommandEvent& event)
m_OptGridSizeY->GetValue().ToDouble( &dtmp ); m_OptGridSizeY->GetValue().ToDouble( &dtmp );
g_UserGrid.y = dtmp; g_UserGrid.y = dtmp;
m_Parent->GetScreen()->AddGrid( g_UserGrid, g_UserGrid_Unit, m_Parent->GetScreen()->AddGrid( g_UserGrid, g_UserGrid_Unit, ID_POPUP_GRID_USER );
ID_POPUP_GRID_USER );
EndModal(1); EndModal(1);
// If the user grid is the current selection , ensure grid size value = new user grid value
int ii = m_Parent->m_SelGridBox->GetSelection();
if ( ii == m_Parent->m_SelGridBox->GetCount() - 1 )
m_Parent->GetScreen()->SetGrid( ID_POPUP_GRID_USER );
m_Parent->DrawPanel->Refresh( TRUE ); m_Parent->DrawPanel->Refresh( TRUE );
} }
......
...@@ -286,12 +286,18 @@ void WinEDA_ModuleEditFrame::ReCreateAuxiliaryToolbar() ...@@ -286,12 +286,18 @@ void WinEDA_ModuleEditFrame::ReCreateAuxiliaryToolbar()
m_SelZoomBox->Append( msg ); m_SelZoomBox->Append( msg );
for( int i = 0; i < (int)GetScreen()->m_ZoomList.GetCount(); i++ ) for( int i = 0; i < (int)GetScreen()->m_ZoomList.GetCount(); i++ )
{ {
msg.Printf( _( "Zoom %d" ), GetScreen()->m_ZoomList[i] ); msg = _( "Zoom " );
if ( (GetScreen()->m_ZoomList[i] % GetScreen()->m_ZoomScalar) == 0 )
msg << GetScreen()->m_ZoomList[i] / GetScreen()->m_ZoomScalar;
else
{
wxString value;
value.Printf(wxT("%.1f"),(float)GetScreen()->m_ZoomList[i] / GetScreen()->m_ZoomScalar );
msg += value;
}
m_SelZoomBox->Append( msg ); m_SelZoomBox->Append( msg );
} }
m_SelZoomBox->Append( wxT( "" ) );
m_AuxiliaryToolBar->AddControl( m_SelZoomBox ); m_AuxiliaryToolBar->AddControl( m_SelZoomBox );
// after adding the buttons to the toolbar, must call Realize() to reflect // after adding the buttons to the toolbar, must call Realize() to reflect
......
...@@ -603,8 +603,6 @@ void WinEDA_PcbFrame::ReCreateAuxiliaryToolbar() ...@@ -603,8 +603,6 @@ void WinEDA_PcbFrame::ReCreateAuxiliaryToolbar()
m_SelZoomBox->Append( msg ); m_SelZoomBox->Append( msg );
} }
m_SelZoomBox->Append( wxT( "" ) );
m_AuxiliaryToolBar->AddControl( m_SelZoomBox ); m_AuxiliaryToolBar->AddControl( m_SelZoomBox );
// after adding the buttons to the toolbar, must call Realize() // after adding the buttons to the toolbar, must call Realize()
......
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