mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
Introduction of classes ColorRGB and ColorRGBA to unify color data definition and manipulation
(cherry picked from commit prusa3d/PrusaSlicer@d0bff2d996 )
This commit is contained in:
committed by
Noisyfox
parent
36ffb18059
commit
28d0147d09
@@ -2812,13 +2812,13 @@ int ObjectTablePanel::init_filaments_and_colors()
|
||||
}
|
||||
|
||||
unsigned int i = 0;
|
||||
unsigned char rgb[3];
|
||||
ColorRGB rgb;
|
||||
while (i < m_filaments_count) {
|
||||
const std::string& txt_color = global_config->opt_string("filament_colour", i);
|
||||
if (i < color_count) {
|
||||
if (Slic3r::GUI::BitmapCache::parse_color(txt_color, rgb))
|
||||
if (decode_color(txt_color, rgb))
|
||||
{
|
||||
m_filaments_colors[i] = wxColour(rgb[0], rgb[1], rgb[2]);
|
||||
m_filaments_colors[i] = wxColour(rgb.r_uchar(), rgb.g_uchar(), rgb.b_uchar());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user