[UI] Show VATSIM AFV map until our own map is ready

This commit is contained in:
Klaus Basan
2019-10-31 17:50:01 +01:00
committed by Mat Sutcliffe
parent 848911c168
commit 9d218f39f8
3 changed files with 19 additions and 0 deletions

View File

@@ -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();

View File

@@ -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);

View File

@@ -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;
}