mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
Ref T506, only use displayInInfoWindow if not an overlay text message widget
This commit is contained in:
committed by
Mat Sutcliffe
parent
3c314e9882
commit
f2722d78f7
@@ -191,7 +191,7 @@ namespace BlackGui
|
||||
|
||||
if (msgSettings.popupSelcalMessages())
|
||||
{
|
||||
emit this->displayInInfoWindow(CLogMessage(this).info(u"SELCAL received"), 3 * 1000);
|
||||
this->emitDisplayInInfoWindow(CLogMessage(this).info(u"SELCAL received"), 3 * 1000);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@@ -246,7 +246,7 @@ namespace BlackGui
|
||||
{
|
||||
if (msgSettings.popup(message, ownAircraft))
|
||||
{
|
||||
emit this->displayInInfoWindow(CVariant::from(message), 5 * 1000);
|
||||
this->emitDisplayInInfoWindow(CVariant::from(message), 15 * 1000);
|
||||
}
|
||||
}
|
||||
} // message
|
||||
@@ -537,6 +537,12 @@ namespace BlackGui
|
||||
return m_usedAsOverlayWidget ? true : this->isVisibleWidget();
|
||||
}
|
||||
|
||||
void CTextMessageComponent::emitDisplayInInfoWindow(const CVariant &message, int displayDurationMs)
|
||||
{
|
||||
if (m_usedAsOverlayWidget) { return; }
|
||||
emit this->displayInInfoWindow(message, displayDurationMs);
|
||||
}
|
||||
|
||||
void CTextMessageComponent::handleEnteredTextMessage(const QString &textMessage)
|
||||
{
|
||||
if (!this->isVisibleWidgetHack()) { return; }
|
||||
|
||||
@@ -103,7 +103,8 @@ namespace BlackGui
|
||||
void updateAtcStationsButtons();
|
||||
|
||||
signals:
|
||||
//! Message to be displayed in info window
|
||||
//! Message to be displayed in central info window
|
||||
//! \remark do not emit in overlay messages
|
||||
void displayInInfoWindow(const BlackMisc::CVariant &message, int displayDurationMs);
|
||||
|
||||
//! Command line was entered
|
||||
@@ -213,6 +214,9 @@ namespace BlackGui
|
||||
|
||||
//! Visible widget hack
|
||||
bool isVisibleWidgetHack() const;
|
||||
|
||||
//! Emit the display in info window signal
|
||||
void emitDisplayInInfoWindow(const BlackMisc::CVariant &message, int displayDurationMs);
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
Reference in New Issue
Block a user