Remove ZONE_FILLER_TOOL since it's not really necessary.

It was causing intermittent failures on GTK.  We'll no doubt want
tools in the QA framework at some point, but probably not necessary
for 6.0....
This commit is contained in:
Jeff Young 2021-07-31 01:50:42 +01:00
parent f485ba9338
commit bceb3794f8
4 changed files with 17 additions and 10 deletions

View File

@ -38,6 +38,14 @@
using namespace std::placeholders; using namespace std::placeholders;
BOARD_COMMIT::BOARD_COMMIT( TOOL_MANAGER* aToolMgr ) :
m_toolMgr( aToolMgr ),
m_isFootprintEditor( false ),
m_resolveNetConflicts( false )
{
}
BOARD_COMMIT::BOARD_COMMIT( PCB_TOOL_BASE* aTool ) : BOARD_COMMIT::BOARD_COMMIT( PCB_TOOL_BASE* aTool ) :
m_resolveNetConflicts( false ) m_resolveNetConflicts( false )
{ {

View File

@ -37,6 +37,7 @@ class TOOL_BASE;
class BOARD_COMMIT : public COMMIT class BOARD_COMMIT : public COMMIT
{ {
public: public:
BOARD_COMMIT( TOOL_MANAGER* aToolMgr );
BOARD_COMMIT( EDA_DRAW_FRAME* aFrame ); BOARD_COMMIT( EDA_DRAW_FRAME* aFrame );
BOARD_COMMIT( PCB_TOOL_BASE *aTool ); BOARD_COMMIT( PCB_TOOL_BASE *aTool );

View File

@ -55,8 +55,9 @@ struct DRC_REGRESSION_TEST_FIXTURE
m_board = nullptr; m_board = nullptr;
} }
std::string boardPath = KI_TEST::GetPcbnewTestDataDir() + relPath.ToStdString() + ".kicad_pcb"; std::string absPath = KI_TEST::GetPcbnewTestDataDir() + relPath.ToStdString();
wxString projectPath = KI_TEST::GetPcbnewTestDataDir() + relPath.ToStdString() + ".kicad_pro"; std::string projectPath = absPath + ".kicad_pro";
std::string boardPath = absPath + ".kicad_pcb";
wxFileName pro( projectPath ); wxFileName pro( projectPath );
@ -74,13 +75,11 @@ struct DRC_REGRESSION_TEST_FIXTURE
m_toolMgr = std::make_unique<TOOL_MANAGER>(); m_toolMgr = std::make_unique<TOOL_MANAGER>();
m_toolMgr->SetEnvironment( m_board.get(), nullptr, nullptr, nullptr, nullptr ); m_toolMgr->SetEnvironment( m_board.get(), nullptr, nullptr, nullptr, nullptr );
m_toolMgr->RegisterTool( new ZONE_FILLER_TOOL );
} }
void fillZones( int aFillVersion ) void fillZones( int aFillVersion )
{ {
ZONE_FILLER_TOOL* fillerTool = m_toolMgr->GetTool<ZONE_FILLER_TOOL>(); BOARD_COMMIT commit( m_toolMgr.get() );
BOARD_COMMIT commit( fillerTool );
ZONE_FILLER filler( m_board.get(), &commit ); ZONE_FILLER filler( m_board.get(), &commit );
std::vector<ZONE*> toFill; std::vector<ZONE*> toFill;

View File

@ -55,8 +55,9 @@ struct ZONE_FILL_TEST_FIXTURE
m_board = nullptr; m_board = nullptr;
} }
std::string boardPath = KI_TEST::GetPcbnewTestDataDir() + relPath.ToStdString() + ".kicad_pcb"; std::string absPath = KI_TEST::GetPcbnewTestDataDir() + relPath.ToStdString();
wxString projectPath = KI_TEST::GetPcbnewTestDataDir() + relPath.ToStdString() + ".kicad_pro"; std::string projectPath = absPath + ".kicad_pro";
std::string boardPath = absPath + ".kicad_pcb";
wxFileName pro( projectPath ); wxFileName pro( projectPath );
@ -74,13 +75,11 @@ struct ZONE_FILL_TEST_FIXTURE
m_toolMgr = std::make_unique<TOOL_MANAGER>(); m_toolMgr = std::make_unique<TOOL_MANAGER>();
m_toolMgr->SetEnvironment( m_board.get(), nullptr, nullptr, nullptr, nullptr ); m_toolMgr->SetEnvironment( m_board.get(), nullptr, nullptr, nullptr, nullptr );
m_toolMgr->RegisterTool( new ZONE_FILLER_TOOL );
} }
void fillZones( int aFillVersion ) void fillZones( int aFillVersion )
{ {
ZONE_FILLER_TOOL* fillerTool = m_toolMgr->GetTool<ZONE_FILLER_TOOL>(); BOARD_COMMIT commit( m_toolMgr.get() );
BOARD_COMMIT commit( fillerTool );
ZONE_FILLER filler( m_board.get(), &commit ); ZONE_FILLER filler( m_board.get(), &commit );
std::vector<ZONE*> toFill; std::vector<ZONE*> toFill;