mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-12 00:29:17 +05:00
IPAL52559: TC7.5.0: Auto color has no effect on the faces group
This commit is contained in:
parent
3f66560195
commit
a671072fe6
@ -1756,6 +1756,19 @@ namespace
|
|||||||
return RefType;
|
return RefType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
} //namespace
|
||||||
|
|
||||||
void SMESHGUI::OnEditDelete()
|
void SMESHGUI::OnEditDelete()
|
||||||
@ -6939,7 +6952,7 @@ SALOMEDS::Color SMESHGUI::getPredefinedUniqueColor()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static int currentColor = 0;
|
static int currentColor = randomize( colors.size() );
|
||||||
|
|
||||||
SALOMEDS::Color color;
|
SALOMEDS::Color color;
|
||||||
color.R = (double)colors[currentColor].red() / 255.0;
|
color.R = (double)colors[currentColor].red() / 255.0;
|
||||||
|
Loading…
Reference in New Issue
Block a user