FIX:fixed the disabled status of multi-color materials

Change-Id: I5472dc667fc81681af92a3b16e9fde9c8c1d9158
(cherry picked from commit e563b30b4d5c19e83cbd9c690ae6b9bd6d0bcfa2)
This commit is contained in:
tao wang
2025-01-15 17:37:28 +08:00
committed by Noisyfox
parent b93140f019
commit 5c2281bb07

View File

@@ -971,7 +971,7 @@ void MappingItem::doRender(wxDC &dc)
//draw a rectangle based on the material color, single color or muti color processing //draw a rectangle based on the material color, single color or muti color processing
if (m_tray_data.material_cols.size() > 1) { if (m_tray_data.material_cols.size() > 1 && !m_unmatch) {
int left = 0; int left = 0;
int gwidth = std::round(MAPPING_ITEM_REAL_SIZE.x / (m_tray_data.material_cols.size() - 1)); int gwidth = std::round(MAPPING_ITEM_REAL_SIZE.x / (m_tray_data.material_cols.size() - 1));
//gradient //gradient
@@ -991,7 +991,7 @@ void MappingItem::doRender(wxDC &dc)
} }
} }
} }
else if (color.Alpha() == 0) { else if (color.Alpha() == 0 && !m_unmatch) {
dc.DrawBitmap( m_transparent_mapping_item.bmp(), 0, (size.y - MAPPING_ITEM_REAL_SIZE.y) / 2); dc.DrawBitmap( m_transparent_mapping_item.bmp(), 0, (size.y - MAPPING_ITEM_REAL_SIZE.y) / 2);
} }
else { else {