mirror of
https://github.com/leozide/leocad
synced 2025-01-18 22:26:44 +01:00
Removed gNumUserColors.
This commit is contained in:
parent
3553de5a58
commit
99a0011764
4 changed files with 8 additions and 12 deletions
|
@ -6,7 +6,6 @@
|
|||
|
||||
std::vector<lcColor> gColorList;
|
||||
lcColorGroup gColorGroups[LC_NUM_COLORGROUPS];
|
||||
int gNumUserColors;
|
||||
int gEdgeColor;
|
||||
int gDefaultColor;
|
||||
|
||||
|
@ -486,8 +485,6 @@ bool lcLoadColorFile(lcFile& File, lcStudStyle StudStyle)
|
|||
gEdgeColor = ColorIndex;
|
||||
}
|
||||
|
||||
gNumUserColors = (int)Colors.size() - 2;
|
||||
|
||||
return Valid;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,6 @@ enum lcInterfaceColor
|
|||
extern lcVector4 gInterfaceColors[LC_NUM_INTERFACECOLORS];
|
||||
extern std::vector<lcColor> gColorList;
|
||||
extern lcColorGroup gColorGroups[LC_NUM_COLORGROUPS];
|
||||
extern int gNumUserColors;
|
||||
extern int gEdgeColor;
|
||||
extern int gDefaultColor;
|
||||
|
||||
|
|
|
@ -324,7 +324,7 @@ void PieceInfo::GetPartsList(int DefaultColorIndex, bool ScanSubModels, bool Add
|
|||
if (ScanSubModels)
|
||||
mModel->GetPartsList(DefaultColorIndex, ScanSubModels, AddSubModels, PartsList);
|
||||
|
||||
if (AddSubModels && DefaultColorIndex < gNumUserColors)
|
||||
if (AddSubModels)
|
||||
PartsList[this][DefaultColorIndex]++;
|
||||
}
|
||||
else if (IsProject())
|
||||
|
@ -333,7 +333,7 @@ void PieceInfo::GetPartsList(int DefaultColorIndex, bool ScanSubModels, bool Add
|
|||
if (Model)
|
||||
Model->GetPartsList(DefaultColorIndex, ScanSubModels, AddSubModels, PartsList);
|
||||
}
|
||||
else if (DefaultColorIndex < gNumUserColors)
|
||||
else
|
||||
PartsList[this][DefaultColorIndex]++;
|
||||
}
|
||||
|
||||
|
|
|
@ -50,23 +50,23 @@ lcQPropertiesDialog::lcQPropertiesDialog(QWidget* Parent, lcPropertiesDialogOpti
|
|||
const lcPartsList& PartsList = mOptions->PartsList;
|
||||
QStringList horizontalLabels;
|
||||
|
||||
QVector<bool> ColorsUsed(gNumUserColors);
|
||||
std::vector<bool> ColorsUsed(gColorList.size());
|
||||
|
||||
for (const auto& PartIt : PartsList)
|
||||
for (const auto& ColorIt : PartIt.second)
|
||||
ColorsUsed[ColorIt.first] = true;
|
||||
|
||||
QVector<int> ColorColumns(gNumUserColors);
|
||||
std::vector<int> ColorColumns(gColorList.size());
|
||||
int NumColors = 0;
|
||||
|
||||
horizontalLabels.append(tr("Part"));
|
||||
|
||||
for (int colorIdx = 0; colorIdx < gNumUserColors; colorIdx++)
|
||||
for (size_t ColorIndex = 0; ColorIndex < gColorList.size(); ColorIndex++)
|
||||
{
|
||||
if (ColorsUsed[colorIdx])
|
||||
if (ColorsUsed[ColorIndex])
|
||||
{
|
||||
ColorColumns[colorIdx] = NumColors++;
|
||||
horizontalLabels.append(gColorList[colorIdx].Name);
|
||||
ColorColumns[ColorIndex] = NumColors++;
|
||||
horizontalLabels.append(gColorList[ColorIndex].Name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue