Skip to content

Commit

Permalink
Update label.cpp (setupWidget)
Browse files Browse the repository at this point in the history
add UniqueID variant to atom labels list in setupWidget() 

Signed-off-by: Ivan Mitrichev <[email protected]>
  • Loading branch information
imitrichev authored Dec 24, 2023
1 parent a22ede8 commit 9b49f53
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion avogadro/qtplugins/label/label.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ struct LayerLabel : Core::LayerData

auto* atom = new QComboBox;
atom->setObjectName("atom");
char elements[] = { None, Index, Name, Custom, Ordinal };
char elements[] = { None, Index, Name, Custom, Ordinal, UniqueID };
for (char option : elements) {
if (option == 0) {
atom->addItem(QObject::tr("None"), QVariant(LabelOptions::None));
Expand All @@ -174,6 +174,11 @@ struct LayerLabel : Core::LayerData
: QObject::tr("El.&No."));
val |= LabelOptions::Ordinal;
}
if (option & LabelOptions::UniqueID) {
text << ((text.size() == 0) ? QObject::tr("Unique ID")
: QObject::tr("Un.ID"));
val |= LabelOptions::UniqueID;
}
QString join = QObject::tr(", ");
atom->addItem(text.join(join), QVariant(val));
if (val == atomOptions) {
Expand Down

0 comments on commit 9b49f53

Please sign in to comment.