mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-26 09:20:35 +05:00
IPAL52559: TC7.5.0: Auto color has no effect on the faces group
This commit is contained in:
parent
76bdbaedf7
commit
84fa6ee9f3
@ -253,7 +253,20 @@ namespace
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
uint randomize( uint size )
|
||||
{
|
||||
static bool initialized = false;
|
||||
if ( !initialized ) {
|
||||
qsrand( QDateTime::currentDateTime().toTime_t() );
|
||||
initialized = true;
|
||||
}
|
||||
uint v = qrand();
|
||||
v = uint( (double)( v ) / RAND_MAX * size );
|
||||
v = qMax( uint(0), qMin ( v, size-1 ) );
|
||||
return v;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
//================================================================
|
||||
// Function : getActiveStudy
|
||||
@ -2261,7 +2274,7 @@ SALOMEDS::Color GEOM_Displayer::getPredefinedUniqueColor()
|
||||
}
|
||||
}
|
||||
|
||||
static int currentColor = 0;
|
||||
static int currentColor = randomize( colors.size() );
|
||||
|
||||
SALOMEDS::Color color;
|
||||
color.R = (double)colors[currentColor].red() / 255.0;
|
||||
|
Loading…
Reference in New Issue
Block a user