mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
Ref T442, moved tree model into own class
* columns can be used as with list model * own class/file
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "blackgui/infoarea.h"
|
||||
#include "blackgui/uppercasevalidator.h"
|
||||
#include "blackgui/models/atcstationlistmodel.h"
|
||||
#include "blackgui/models/atcstationtreemodel.h"
|
||||
#include "blackgui/views/atcstationview.h"
|
||||
#include "blackgui/views/viewbase.h"
|
||||
#include "blackmisc/aviation/atcstationlist.h"
|
||||
@@ -377,7 +378,7 @@ namespace BlackGui
|
||||
//! \fixme EXPERIMENTAL CODE: change model so we can directly use hierarchies
|
||||
QAbstractItemModel *old = (ui->tvp_AtcStationsOnlineTree->model());
|
||||
ui->tvp_AtcStationsOnlineTree->setModel(
|
||||
ui->tvp_AtcStationsOnline->derivedModel()->toAtcGroupModel()
|
||||
ui->tvp_AtcStationsOnline->derivedModel()->toAtcTreeModel()
|
||||
);
|
||||
if (old) { old->deleteLater(); } // delete old model replaced by current model
|
||||
if (!ui->tvp_AtcStationsOnlineTree->model()) { return; }
|
||||
|
||||
Reference in New Issue
Block a user