void StationTreeView::removeStationList() { QModelIndex index (this->selectionModel()->currentIndex()); if (!index.isValid()) OGSError::box("No station list selected."); else { TreeItem* item = static_cast<StationTreeModel*>(model())->getItem(index); emit stationListRemoved((item->data(0).toString()).toStdString()); if(this->selectionModel()->selectedIndexes().count() == 0) { emit enableSaveButton(false); emit enableRemoveButton(false); } } }
void StationTreeView::removeStationList() { TreeItem* item = static_cast<StationTreeModel*>(model())->getItem( this->selectionModel()->currentIndex()); emit stationListRemoved((item->data(0).toString()).toStdString()); }