Commit 07299b3e authored by charras's avatar charras

eeschema: removed a bug that crashes eeschema when attempting to edit a component not found in lib

parent 23db3713
# makefile pour cvpcb (mingw)
OBJSUFF = o
EXTRACPPFLAGS += -DCVPCB -fno-strict-aliasing\
-I./ -I../cvpcb -I../include -Ibitmaps\
-I../pcbnew -I../3d-viewer -I ../polygon
EXTRACPPFLAGS += -DCVPCB -I../include -Ibitmaps\
-I../pcbnew -I../cvpcb -I../share -I../3d-viewer -I ../polygon
EXTRALIBS = ../common/common.a ../bitmaps/libbitmaps.a\
../polygon/lib_polygon.a\
......@@ -17,6 +16,7 @@ OBJECTS = $(TARGET).o \
class_zone.o\
class_zone_setting.o\
class_board_connected_item.o\
class_board_item.o\
memoire.o \
cvframe.o\
listboxes.o\
......@@ -81,6 +81,9 @@ class_mire.o: ../pcbnew/class_mire.cpp ../pcbnew/class_mire.h $(COMMON)
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
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_zone.o: ../pcbnew/class_zone.cpp ../pcbnew/class_zone.h $(COMMON)
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
......
......@@ -30,7 +30,7 @@ void InstallCmpeditFrame( WinEDA_SchematicFrame* parent, wxPoint& pos,
if( aComponent->Type() != TYPE_SCH_COMPONENT )
{
DisplayError( parent,
wxT( "InstallCmpeditFrame() error: This struct is not a component" ) );
wxT( "InstallCmpeditFrame() error: This item is not a component" ) );
}
else
{
......@@ -52,7 +52,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( wxWindow
{
m_Parent = (WinEDA_SchematicFrame*) parent;
m_LibEntry = 0;
m_LibEntry = NULL;
m_skipCopyFromPanel = false;
wxListItem columnLabel;
......@@ -524,10 +524,10 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyOptionsToPanel()
int choiceCount = unitChoice->GetCount();
// Remove non existing choices (choiceCount must be <= number for parts)
int unitcount = m_LibEntry->m_UnitCount;
int unitcount = m_LibEntry ? m_LibEntry->m_UnitCount : 1;
if ( unitcount < 1 )
unitcount = 1;
if( m_LibEntry && ( unitcount < choiceCount) )
if( unitcount < choiceCount )
{
while ( unitcount < choiceCount )
{
......
......@@ -76,6 +76,9 @@ files.o: files.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
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_marker.o: ../pcbnew/class_marker.cpp ../pcbnew/class_marker.h
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
......
......@@ -564,12 +564,10 @@ public:
/** Function Fill_All_Zones()
* Fill all zones on the board
* The old fillings are removed
* @param frame = reference to the main frame
* @param DC = current Device Context
* @param verbose = true to show error messages
* @return error level (0 = no error)
*/
int Fill_All_Zones( wxDC* DC, bool verbose = TRUE );
int Fill_All_Zones( bool verbose = TRUE );
/**
......
No preview for this file type
This diff is collapsed.
......@@ -45,6 +45,8 @@ ALL_LDFLAGS = -s #-v
FINAL = 1
endif
CPPFLAGS += -I $(BOOST_PATH)
ALL_CPPFLAGS = `$(WXWIN)/wx-config --cppflags` $(CPPFLAGS)
EDACPPFLAGS = $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) $(EXTRACPPFLAGS)
EDALIBS = $(EXTRALIBS)
......@@ -54,7 +56,7 @@ PYTHON_PATH=/c/Python25
PYLIBS= -L$(PYTHON_PATH)/libs
PYLIBS+= -L $(PYTHON_PATH)/Lib
PYLIBS+= -lpython2.5
EXTRACPPFLAGS+=-I $(PYTHON_PATH)/include -DKICAD_PYTHON -I $(BOOST_PATH) -fno-strict-aliasing -ggdb
EXTRACPPFLAGS+=-I $(PYTHON_PATH)/include -DKICAD_PYTHON -ggdb
endif
SYSWXLIB = `$(WXWIN)/wx-config --libs gl`\
......
......@@ -30,7 +30,6 @@
/****************************/
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "pcbnew.h"
......@@ -196,6 +195,10 @@ void DRC::RunTests()
// test track and via clearances to other tracks, pads, and vias
testTracks();
// Before testing segments and unconnected, refill all zones:
// this is a good caution, and mandatory if using filling zones by solid polygons
m_mainWindow->Fill_All_Zones( false );
// test zone clearances to other zones, pads, tracks, and vias
testZones( m_doZonesTest );
......
......@@ -542,7 +542,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_PCB_FILL_ALL_ZONES:
DrawPanel->MouseToCursorSchema();
Fill_All_Zones( &dc );
Fill_All_Zones( );
break;
case ID_POPUP_PCB_REMOVE_FILLED_AREAS_IN_CURRENT_ZONE:
......
......@@ -6,7 +6,6 @@ TARGET=pcbnew
include ../libs.win
EXTRACPPFLAGS += -I /f/kicad-sourceforge/trunk/kicad -I $(BOOST_PATH)
all: $(TARGET).exe
include makefile.include
......@@ -15,7 +14,7 @@ $(TARGET).exe: $(OBJECTS) $(TARGET)_resources.o\
$(EDALIBS) $(LIBVIEWER3D) makefile.g95
$(CXX) $(ALL_LDFLAGS) -o $(TARGET).exe\
$(OBJECTS) $(LIBVIEWER3D) $(TARGET)_resources.o $(EDALIBS) $(SYSWXLIB)
install: $(TARGET).exe
cp $(TARGET).exe $(KICAD_BIN)
......
......@@ -3,11 +3,9 @@ EXTRALIBS = ../common/common.a ../bitmaps/libbitmaps.a\
../polygon/lib_polygon.a\
../polygon/kbool/src/libkbool.a
EXTRACPPFLAGS += -DPCBNEW -fno-strict-aliasing -I./ -Ibitmaps -I../include -I../share\
-I../pcbnew -I../3d-viewer -I../polygon -I/opt/local/include
EXTRACPPFLAGS += -DPCBNEW -I../pcbnew -Ibitmaps -I../include\
-I../3d-viewer -I../polygon -I/opt/local/include
#COMMON = pcbnew.h struct.h class_pad.h class_module.h class_text_mod.h \
# class_edge_mod.h class_equipot.h
LIBVIEWER3D = ../3d-viewer/3d-viewer.a
......@@ -136,7 +134,7 @@ OBJECTS= $(TARGET).o classpcb.o\
gpcb_exchange.o
PolyLine.o: ../polygon/PolyLine.cpp ../polygon/PolyLine.h $(COMMON)
PolyLine.o: ../polygon/PolyLine.cpp ../polygon/PolyLine.h
$(CXX) -c $(EDACPPFLAGS) -o $@ ../polygon/$*.cpp
setpage.o: ../share/setpage.cpp
......@@ -148,177 +146,177 @@ drawpanel.o: ../share/drawpanel.cpp
drawframe.o: ../share/drawframe.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../share/$*.cpp
menubarpcb.o: menubarpcb.cpp $(COMMON)
menubarpcb.o: menubarpcb.cpp
dialog_general_options.o: dialog_general_options.cpp dialog_track_options.cpp dialog_display_options.cpp\
dialog_graphic_items_options.cpp $(COMMON)
dialog_graphic_items_options.cpp
menubarmodedit.o: menubarmodedit.cpp $(COMMON)
menubarmodedit.o: menubarmodedit.cpp
controle.o: controle.cpp $(COMMON)
controle.o: controle.cpp
cursors.o: cursors.cpp $(COMMON)
cursors.o: cursors.cpp
tool_onrightclick.o: tool_onrightclick.cpp $(COMMON)
tool_onrightclick.o: tool_onrightclick.cpp
files.o: files.cpp $(COMMON)
files.o: files.cpp
export_gencad.o: export_gencad.cpp $(COMMON)
export_gencad.o: export_gencad.cpp
wxprint.o: ../share/wxprint.cpp ../share/dialog_print.cpp ../share/dialog_print.h $(COMMON)
wxprint.o: ../share/wxprint.cpp ../share/dialog_print.cpp ../share/dialog_print.h
$(CXX) -c $(EDACPPFLAGS) -o $@ ../share/$*.cpp
lay2plot.o: lay2plot.cpp $(COMMON)
lay2plot.o: lay2plot.cpp
classpcb.o: classpcb.cpp $(COMMON)
classpcb.o: classpcb.cpp
class_track.o: class_track.cpp class_track.h $(COMMON)
class_track.o: class_track.cpp class_track.h
class_mire.o: class_mire.cpp class_mire.h $(COMMON)
class_mire.o: class_mire.cpp class_mire.h
class_cotation.o: class_cotation.cpp class_cotation.h $(COMMON)
class_cotation.o: class_cotation.cpp class_cotation.h
class_pad.o: class_pad.cpp $(COMMON)
class_pad.o: class_pad.cpp
class_equipot.o: class_equipot.cpp $(COMMON)
class_equipot.o: class_equipot.cpp
class_module.o: class_module.cpp $(COMMON)
class_module.o: class_module.cpp
class_edge_mod.o: class_edge_mod.cpp $(COMMON)
class_edge_mod.o: class_edge_mod.cpp
class_text_mod.o: class_text_mod.cpp $(COMMON)
class_text_mod.o: class_text_mod.cpp
class_pcb_text.o: class_pcb_text.cpp class_pcb_text.h $(COMMON)
class_pcb_text.o: class_pcb_text.cpp class_pcb_text.h
pcbnew.o: pcbnew.cpp pcbnew.h pcbplot.h drag.h $(COMMON) \
pcbnew.o: pcbnew.cpp pcbnew.h pcbplot.h drag.h \
autorout.h ../include/eda_dde.h
pcbcfg.o: pcbcfg.cpp $(COMMON) pcbcfg.h pcbplot.h
pcbcfg.o: pcbcfg.cpp pcbcfg.h pcbplot.h
netlist.o: netlist.cpp dialog_netlist.cpp dialog_netlist.h $(COMMON)
netlist.o: netlist.cpp dialog_netlist.cpp dialog_netlist.h
gen_modules_placefile.o: gen_modules_placefile.cpp $(COMMON)
gen_modules_placefile.o: gen_modules_placefile.cpp
xchgmod.o: xchgmod.cpp $(COMMON)
xchgmod.o: xchgmod.cpp
swap_layers.o: swap_layers.cpp $(COMMON)
swap_layers.o: swap_layers.cpp
tracepcb.o: tracepcb.cpp $(COMMON)
tracepcb.o: tracepcb.cpp
tracemod.o: tracemod.cpp ../include/grfonte.h $(COMMON)
tracemod.o: tracemod.cpp ../include/grfonte.h
trpiste.o: trpiste.cpp $(COMMON)
trpiste.o: trpiste.cpp
surbrill.o: surbrill.cpp $(COMMON)
surbrill.o: surbrill.cpp
pcbtexte.o: pcbtexte.cpp $(COMMON)
pcbtexte.o: pcbtexte.cpp
locate.o: locate.cpp $(COMMON)
locate.o: locate.cpp
modules.o: modules.cpp drag.h $(COMMON)
modules.o: modules.cpp drag.h
autoplac.o: autoplac.cpp autorout.h $(COMMON)
autoplac.o: autoplac.cpp autorout.h
automove.o: automove.cpp autorout.h $(COMMON)
automove.o: automove.cpp autorout.h
loadcmp.o: loadcmp.cpp $(COMMON)
loadcmp.o: loadcmp.cpp
zoom.o: ../share/zoom.cpp $(COMMON)
zoom.o: ../share/zoom.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../share/$*.cpp
affiche.o: affiche.cpp $(COMMON)
affiche.o: affiche.cpp
tr_modif.o: tr_modif.cpp $(COMMON)
tr_modif.o: tr_modif.cpp
dialog_setup_libs.o: dialog_setup_libs.cpp $(COMMON)
dialog_setup_libs.o: dialog_setup_libs.cpp
initpcb.o: initpcb.cpp dialog_initpcb.cpp dialog_initpcb.h $(COMMON)
initpcb.o: initpcb.cpp dialog_initpcb.cpp dialog_initpcb.h
editrack.o: editrack.cpp $(COMMON)
editrack.o: editrack.cpp
attribut.o: attribut.cpp $(COMMON)
attribut.o: attribut.cpp
deltrack.o: deltrack.cpp $(COMMON)
deltrack.o: deltrack.cpp
track.o: track.cpp $(COMMON)
track.o: track.cpp
edit_track_width.o: edit_track_width.cpp $(COMMON)
edit_track_width.o: edit_track_width.cpp
editmod.o: editmod.cpp dialog_edit_module.cpp dialog_edit_module.h $(COMMON)
editmod.o: editmod.cpp dialog_edit_module.cpp dialog_edit_module.h
move-drag_pads.o: move-drag_pads.cpp drag.h $(COMMON)
move-drag_pads.o: move-drag_pads.cpp drag.h
editedge.o: editedge.cpp $(COMMON)
editedge.o: editedge.cpp
cotation.o: cotation.cpp $(COMMON)
cotation.o: cotation.cpp
edtxtmod.o: edtxtmod.cpp $(COMMON)
edtxtmod.o: edtxtmod.cpp
dialog_edit_mod_text.o: dialog_edit_mod_text.cpp dialog_edit_mod_text.h $(COMMON)
dialog_edit_mod_text.o: dialog_edit_mod_text.cpp dialog_edit_mod_text.h
ratsnest.o: ratsnest.cpp $(COMMON)
ratsnest.o: ratsnest.cpp
connect.o: connect.cpp $(COMMON)
connect.o: connect.cpp
drc.o: drc.cpp dialog_drc.cpp dialog_drc.h autorout.h $(COMMON)
drc.o: drc.cpp dialog_drc.cpp dialog_drc.h autorout.h
block.o: block.cpp $(COMMON)
block.o: block.cpp
clean.o: clean.cpp cleaningoptions_dialog.cpp cleaningoptions_dialog.h $(COMMON)
clean.o: clean.cpp cleaningoptions_dialog.cpp cleaningoptions_dialog.h
pcbplot.o: pcbplot.cpp pcbplot.h $(COMMON)
pcbplot.o: pcbplot.cpp pcbplot.h
plothpgl.o: plothpgl.cpp $(COMMON)
plothpgl.o: plothpgl.cpp
plotgerb.o: plotgerb.cpp pcbplot.h plotgerb.h $(COMMON)
plotgerb.o: plotgerb.cpp pcbplot.h plotgerb.h
plotps.o: plotps.cpp pcbplot.h $(COMMON)
plotps.o: plotps.cpp pcbplot.h
readgerb.o: readgerb.cpp pcbplot.h $(COMMON)
readgerb.o: readgerb.cpp pcbplot.h
plot_rtn.o: plot_rtn.cpp pcbplot.h $(COMMON)
plot_rtn.o: plot_rtn.cpp pcbplot.h
gendrill.o: gendrill.cpp dialog_gendrill.cpp dialog_gendrill.h pcbplot.h $(COMMON)
gendrill.o: gendrill.cpp dialog_gendrill.cpp dialog_gendrill.h pcbplot.h
librairi.o: librairi.cpp $(COMMON)
librairi.o: librairi.cpp
edgemod.o: edgemod.cpp $(COMMON)
edgemod.o: edgemod.cpp
muonde.o: muonde.cpp drag.h gen_self.h $(COMMON)
muonde.o: muonde.cpp drag.h gen_self.h
autorout.o: autorout.cpp cell.h autorout.h $(COMMON)
autorout.o: autorout.cpp cell.h autorout.h
solve.o: solve.cpp cell.h autorout.h $(COMMON)
solve.o: solve.cpp cell.h autorout.h
work.o: work.cpp cell.h autorout.h $(COMMON)
work.o: work.cpp cell.h autorout.h
queue.o: queue.cpp cell.h autorout.h $(COMMON)
queue.o: queue.cpp cell.h autorout.h
board.o: board.cpp cell.h autorout.h $(COMMON)
board.o: board.cpp cell.h autorout.h
dist.o: dist.cpp cell.h autorout.h $(COMMON)
dist.o: dist.cpp cell.h autorout.h
graphpcb.o: graphpcb.cpp cell.h autorout.h $(COMMON)
graphpcb.o: graphpcb.cpp cell.h autorout.h
zones.o: zones.cpp cell.h $(COMMON)
zones.o: zones.cpp cell.h
zones_by_polygon.o: zones_by_polygon.cpp $(COMMON)
zones_by_polygon.o: zones_by_polygon.cpp
undelete.o: undelete.cpp $(COMMON)
undelete.o: undelete.cpp
move_or_drag_track.o: move_or_drag_track.cpp $(COMMON)
move_or_drag_track.o: move_or_drag_track.cpp
ioascii.o: ioascii.cpp $(COMMON)
ioascii.o: ioascii.cpp
coordbox.o: coordbox.cpp $(COMMON)
coordbox.o: coordbox.cpp
mirepcb.o: mirepcb.cpp $(COMMON)
mirepcb.o: mirepcb.cpp
dragsegm.o: dragsegm.cpp drag.h $(COMMON)
dragsegm.o: dragsegm.cpp drag.h
router.o: router.cpp $(COMMON)
router.o: router.cpp
collectors.o: collectors.cpp collectors.h $(COMMON)
collectors.o: collectors.cpp collectors.h
......@@ -919,14 +919,12 @@ int WinEDA_PcbFrame::Fill_Zone( wxDC* DC, ZONE_CONTAINER* zone_container, bool v
/************************************************************/
int WinEDA_PcbFrame::Fill_All_Zones( wxDC* DC, bool verbose )
int WinEDA_PcbFrame::Fill_All_Zones( bool verbose )
/************************************************************/
/** Function Fill_All_Zones()
* Fill all zones on the board
* The old fillings are removed
* @param frame = reference to the main frame
* @param DC = current Device Context
* @param verbose = true to show error messages
* @return error level (0 = no error)
*/
......
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