mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 01:45:38 +08:00
Flight plan fixes based on https://discordapp.com/channels/539048679160676382/539486309882789888/597133111272275970
* improved setting of combox value, fixed wrong text * do NOT emit signals when same index * getOwnCallsign * do NOT used cache FPs for own aircraft
This commit is contained in:
committed by
Mat Sutcliffe
parent
891a058f17
commit
ea7b3316c9
@@ -250,11 +250,13 @@ namespace BlackGui
|
||||
if (!box) { return false; }
|
||||
if (!candidate.isEmpty())
|
||||
{
|
||||
const int ci = box->currentIndex();
|
||||
for (int i = 0; i < box->count(); i++)
|
||||
{
|
||||
const QString t(box->itemText(i));
|
||||
if (t.contains(candidate, Qt::CaseInsensitive))
|
||||
{
|
||||
if (ci == i) { return true; } // avoid signals
|
||||
box->setCurrentIndex(i);
|
||||
return true;
|
||||
}
|
||||
@@ -263,11 +265,13 @@ namespace BlackGui
|
||||
|
||||
// not found
|
||||
if (unspecified.isEmpty()) { return false; }
|
||||
const int ci = box->currentIndex();
|
||||
for (int i = 0; i < box->count(); i++)
|
||||
{
|
||||
const QString t(box->itemText(i));
|
||||
if (t.contains(unspecified, Qt::CaseInsensitive))
|
||||
{
|
||||
if (ci == i) { return true; } // avoid signals
|
||||
box->setCurrentIndex(i);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user