Commit 78d9e7b7 authored by Maciej Suminski's avatar Maciej Suminski

bugfix: pcbnew crashes when selected component is removed in OpenGL canvas

parent d38c9b20
......@@ -48,6 +48,9 @@
#include <pcbnew.h>
#include <io_mgr.h>
#include <tool/tool_manager.h>
#include <tools/common_actions.h>
void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
const wxString& aCmpFileName,
......@@ -108,6 +111,9 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
}
}
// Clear selection, just in case a selected item has to be removed
m_toolManager->RunAction( COMMON_ACTIONS::selectionClear, true );
netlist.SortByReference();
board->ReplaceNetlist( netlist, aDeleteSinglePadNets, aReporter );
......
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