mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
[UI] Show VATSIM AFV map until our own map is ready
This commit is contained in:
committed by
Mat Sutcliffe
parent
848911c168
commit
9d218f39f8
@@ -886,6 +886,12 @@ namespace BlackGui
|
||||
Q_UNUSED(c)
|
||||
}
|
||||
|
||||
void CGuiApplication::openUrl(const CUrl &url)
|
||||
{
|
||||
if (url.isEmpty() || this->isShuttingDown()) { return; }
|
||||
QDesktopServices::openUrl(url);
|
||||
}
|
||||
|
||||
void CGuiApplication::addMenuHelp(QMenu &menu)
|
||||
{
|
||||
QPointer<QWidget> w = mainApplicationWidget();
|
||||
|
||||
@@ -166,6 +166,9 @@ namespace BlackGui
|
||||
//! Window operations
|
||||
void addMenuWindow(QMenu &menu);
|
||||
|
||||
//! Open a given URL
|
||||
void openUrl(const BlackMisc::Network::CUrl &url);
|
||||
|
||||
//! Help operations
|
||||
void addMenuHelp(QMenu &menu);
|
||||
|
||||
|
||||
@@ -637,11 +637,21 @@ bool SwiftGuiStd::startModelBrowser()
|
||||
|
||||
bool SwiftGuiStd::startAFVMap()
|
||||
{
|
||||
/**
|
||||
if (!m_mapDialog)
|
||||
{
|
||||
m_mapDialog.reset(new CAfvMapDialog(this));
|
||||
m_mapDialog->setWindowModality(Qt::NonModal);
|
||||
}
|
||||
m_mapDialog->exec();
|
||||
**/
|
||||
|
||||
//! \todo KB 2019-11 AFV map workaround
|
||||
if (sGui && !sGui->isShuttingDown())
|
||||
{
|
||||
sGui->openUrl("https://afv-map.vatsim.net/");
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user