Tune connectivity progress reporter
We don't need quite as many updates, this helps speed a little See https://gitlab.com/kicad/code/kicad/-/issues/10154
This commit is contained in:
parent
67fe8904c0
commit
0ec440805d
|
@ -431,7 +431,7 @@ void reportProgress( PROGRESS_REPORTER* aReporter, int aCount, int aSize, int aD
|
||||||
|
|
||||||
void CN_CONNECTIVITY_ALGO::Build( BOARD* aBoard, PROGRESS_REPORTER* aReporter )
|
void CN_CONNECTIVITY_ALGO::Build( BOARD* aBoard, PROGRESS_REPORTER* aReporter )
|
||||||
{
|
{
|
||||||
int delta = 100; // Number of additions between 2 calls to the progress bar
|
int delta = 200; // Number of additions between 2 calls to the progress bar
|
||||||
int ii = 0;
|
int ii = 0;
|
||||||
int size = 0;
|
int size = 0;
|
||||||
|
|
||||||
|
@ -443,7 +443,7 @@ void CN_CONNECTIVITY_ALGO::Build( BOARD* aBoard, PROGRESS_REPORTER* aReporter )
|
||||||
|
|
||||||
size *= 2; // Our caller us gets the other half of the progress bar
|
size *= 2; // Our caller us gets the other half of the progress bar
|
||||||
|
|
||||||
delta = std::max( delta, size / 50 );
|
delta = std::max( delta, size / 10 );
|
||||||
|
|
||||||
for( ZONE* zone : aBoard->Zones() )
|
for( ZONE* zone : aBoard->Zones() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include <connectivity/from_to_cache.h>
|
#include <connectivity/from_to_cache.h>
|
||||||
|
|
||||||
#include <ratsnest/ratsnest_data.h>
|
#include <ratsnest/ratsnest_data.h>
|
||||||
|
#include <progress_reporter.h>
|
||||||
#include <trigo.h>
|
#include <trigo.h>
|
||||||
|
|
||||||
CONNECTIVITY_DATA::CONNECTIVITY_DATA()
|
CONNECTIVITY_DATA::CONNECTIVITY_DATA()
|
||||||
|
@ -99,7 +100,19 @@ void CONNECTIVITY_DATA::Build( BOARD* aBoard, PROGRESS_REPORTER* aReporter )
|
||||||
if( net->GetNetClass()->GetName() != NETCLASS::Default )
|
if( net->GetNetClass()->GetName() != NETCLASS::Default )
|
||||||
m_netclassMap[ net->GetNetCode() ] = net->GetNetClass()->GetName();
|
m_netclassMap[ net->GetNetCode() ] = net->GetNetClass()->GetName();
|
||||||
|
|
||||||
|
if( aReporter )
|
||||||
|
{
|
||||||
|
aReporter->SetCurrentProgress( 0.75 );
|
||||||
|
aReporter->KeepRefreshing( false );
|
||||||
|
}
|
||||||
|
|
||||||
RecalculateRatsnest();
|
RecalculateRatsnest();
|
||||||
|
|
||||||
|
if( aReporter )
|
||||||
|
{
|
||||||
|
aReporter->SetCurrentProgress( 1.0 );
|
||||||
|
aReporter->KeepRefreshing( false );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue