refs #873, changed signal for selector in internal component

This commit is contained in:
Klaus Basan
2017-02-02 01:15:46 +01:00
committed by Mathew Sutcliffe
parent 2a0d0e1d84
commit 7e70662a29
4 changed files with 28 additions and 3 deletions

View File

@@ -41,6 +41,7 @@ namespace BlackGui
Q_ASSERT(s);
s = connect(sGui->getIContextNetwork(), &IContextNetwork::addedAircraft, this, &CRemoteAircraftSelector::ps_onAddedAircraft);
Q_ASSERT(s);
s = connect(ui->cb_RemoteAircraftSelector, &QComboBox::currentTextChanged, this, &CRemoteAircraftSelector::ps_comboBoxChanged);
Q_UNUSED(s);
}
@@ -83,6 +84,13 @@ namespace BlackGui
}
}
void CRemoteAircraftSelector::ps_comboBoxChanged(const QString &text)
{
if (this->m_currentText == text) { return; }
this->m_currentText = text;
emit this->changedCallsign();
}
void CRemoteAircraftSelector::fillComboBox()
{
if (!this->isVisible()) { return; } // for performance reasons
@@ -127,6 +135,5 @@ namespace BlackGui
ui->cb_RemoteAircraftSelector->setCurrentIndex(index);
}
}
} // namespace
} // namespace