Base: Move App::Color to Base

Every basic data type is stored in Base module, color is standing out as
one that does not. Moving it to Base opens possibilities to integrate it
better with the rest of FreeCAD.
This commit is contained in:
Kacper Donat
2025-02-15 22:58:19 +01:00
parent 0ba52f0e22
commit 13fbab9e42
215 changed files with 1057 additions and 1054 deletions

View File

@@ -113,7 +113,7 @@ void ViewProviderPoints::onChanged(const App::Property* prop)
void ViewProviderPoints::setVertexColorMode(App::PropertyColorList* pcProperty)
{
const std::vector<App::Color>& val = pcProperty->getValues();
const std::vector<Base::Color>& val = pcProperty->getValues();
pcColorMat->diffuseColor.setNum(val.size());
SbColor* col = pcColorMat->diffuseColor.startEditing();
@@ -500,18 +500,18 @@ void ViewProviderScattered::cut(const std::vector<SbVec2f>& picked,
}
else if (type == App::PropertyColorList::getClassTypeId()) {
// static_cast<App::PropertyColorList*>(it->second)->removeIndices(removeIndices);
const std::vector<App::Color>& colors =
const std::vector<Base::Color>& colors =
static_cast<App::PropertyColorList*>(it.second)->getValues();
if (removeIndices.size() > colors.size()) {
break;
}
std::vector<App::Color> remainValue;
std::vector<Base::Color> remainValue;
remainValue.reserve(colors.size() - removeIndices.size());
std::vector<unsigned long>::iterator pos = removeIndices.begin();
for (std::vector<App::Color>::const_iterator jt = colors.begin(); jt != colors.end();
for (std::vector<Base::Color>::const_iterator jt = colors.begin(); jt != colors.end();
++jt) {
unsigned long index = jt - colors.begin();
if (pos == removeIndices.end()) {