mirror of
https://github.com/redstrate/Novus.git
synced 2025-04-23 04:27:45 +00:00
Make GearView::addGear remove gear that already exists in the slot
This commit is contained in:
parent
1be5fc27d0
commit
b1e5728f8f
1 changed files with 7 additions and 0 deletions
|
@ -107,6 +107,13 @@ void GearView::addGear(GearInfo &gear)
|
|||
qDebug() << "Adding gear" << gear.name.c_str();
|
||||
|
||||
queuedGearAdditions.emplace_back(gear);
|
||||
|
||||
for (auto loadedGear : loadedGears) {
|
||||
if (loadedGear.info.slot == gear.slot) {
|
||||
queuedGearRemovals.push_back(loadedGear);
|
||||
}
|
||||
}
|
||||
|
||||
gearDirty = true;
|
||||
|
||||
Q_EMIT gearChanged();
|
||||
|
|
Loading…
Add table
Reference in a new issue