mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +08:00
refs #723, reset order when adding models to own model set
This commit is contained in:
committed by
Mathew Sutcliffe
parent
f85db3cffb
commit
017c593b67
@@ -112,6 +112,7 @@ namespace BlackGui
|
||||
{
|
||||
CLogMessage(this).warning("Removed %1 models from set because not matching %2") << diff << simulator.toQString(true);
|
||||
}
|
||||
cleanModelList.resetOrder();
|
||||
this->ui->tvp_OwnModelSet->updateContainerMaybeAsync(cleanModelList);
|
||||
}
|
||||
|
||||
@@ -128,6 +129,7 @@ namespace BlackGui
|
||||
if (cleanModelList.isEmpty()) { return; }
|
||||
CAircraftModelList updatedModels(this->ui->tvp_OwnModelSet->container());
|
||||
updatedModels.replaceOrAddModelsWithString(cleanModelList, Qt::CaseInsensitive);
|
||||
updatedModels.resetOrder();
|
||||
this->ui->tvp_OwnModelSet->updateContainerMaybeAsync(updatedModels);
|
||||
}
|
||||
|
||||
@@ -165,6 +167,7 @@ namespace BlackGui
|
||||
const int d = updateModels.replaceOrAddModelsWithString(models, Qt::CaseInsensitive);
|
||||
if (d > 0)
|
||||
{
|
||||
updateModels.resetOrder();
|
||||
this->ui->tvp_OwnModelSet->updateContainerMaybeAsync(updateModels);
|
||||
return CStatusMessage(this, CStatusMessage::SeverityInfo, "Modified " + QString::number(d) + " entries in model set " + this->getModelSetSimulator().toQString(true), true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user