mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
Some more fixes:
* sort order in compare was inverted * correct message when model is empty
This commit is contained in:
@@ -476,17 +476,19 @@ namespace BlackGui
|
||||
Q_ASSERT(getIContextOwnAircraft());
|
||||
Q_ASSERT(getIContextSimulator());
|
||||
|
||||
if (!this->getIContextSimulator()->isSimulatorAvailable()) { return; }
|
||||
CAircraftModel model(this->getIContextOwnAircraft()->getOwnAircraft().getModel());
|
||||
QString modelStr(model.hasModelString() ? model.getModelString() : "<unknown>");
|
||||
if (model.getAircraftIcaoCode().hasDesignator())
|
||||
{
|
||||
CLogMessage(this).validationInfo("Reverse lookup for %1") << model.getModelString();
|
||||
CLogMessage(this).validationInfo("Reverse lookup for %1") << modelStr;
|
||||
|
||||
// update GUI
|
||||
this->setGuiIcaoValues(model, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
CLogMessage(this).validationInfo("Reverse lookup for %1 failed, set data manually") << model.getModelString();
|
||||
CLogMessage(this).validationInfo("Reverse lookup for %1 failed, set data manually") << modelStr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@ namespace BlackGui
|
||||
{
|
||||
int c = a.comparePropertyByIndex(b, index);
|
||||
if (c == 0) { return false; }
|
||||
return (order == Qt::AscendingOrder) ? (c > 0) : (c < 0);
|
||||
return (order == Qt::AscendingOrder) ? (c < 0) : (c > 0);
|
||||
}
|
||||
|
||||
//! Sort without compare function
|
||||
|
||||
Reference in New Issue
Block a user