Improved ATIS update in ATC station component

* signal for ATIS received
* reload ATC statiosns when ATIS changes
This commit is contained in:
Klaus Basan
2018-04-28 19:02:46 +02:00
committed by Roland Winklmeier
parent 0b7706471c
commit ae8d9abf0d
5 changed files with 30 additions and 13 deletions

View File

@@ -38,8 +38,8 @@
#include <QTimer>
#include <QTreeView>
#include <QCompleter>
#include <QPointer>
using namespace BlackGui;
using namespace BlackGui::Models;
using namespace BlackGui::Views;
using namespace BlackGui::Settings;
@@ -292,7 +292,12 @@ namespace BlackGui
if (this->isParentDockWidgetFloating()) { return; }
// here I know I am the selected widget, update, but keep GUI responsive (-> timer)
QTimer::singleShot(1000, this, &CAtcStationComponent::update);
const QPointer<CAtcStationComponent> myself(this);
QTimer::singleShot(1000, this, [ = ]
{
if (myself.isNull()) { return; }
this->update();
});
Q_UNUSED(index);
}