7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-19 18:51:40 +00:00

fix assert in wx2.6 compatibility code, on pcbnew startup, when running with debug enabled

This commit is contained in:
raburton 2007-06-16 06:49:57 +00:00
parent be87b19bb0
commit 45e0c6eca7

View File

@ -166,10 +166,12 @@ wxMemoryDC iconDC;
m_HToolBar->SetToolNormalBitmap(ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, *LayerPairBitmap);
#else
int pos = m_HToolBar->GetToolPos(ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR);
m_HToolBar->DeleteTool(ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR);
m_HToolBar->InsertTool(pos, ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, *LayerPairBitmap,
wxNullBitmap, false, NULL, SEL_LAYER_HELP);
m_HToolBar->Realize();
if (pos != wxNOT_FOUND) {
m_HToolBar->DeleteTool(ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR);
m_HToolBar->InsertTool(pos, ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, *LayerPairBitmap,
wxNullBitmap, false, NULL, SEL_LAYER_HELP);
m_HToolBar->Realize();
}
#endif
}