diff --git a/Applications/DataExplorer/DataView/StationTreeModel.cpp b/Applications/DataExplorer/DataView/StationTreeModel.cpp index 36e4f2474fde2f13b5da064dd373af5ad1d509af..e7e472d92e510dbfdf044e87f9354aec5707d71f 100644 --- a/Applications/DataExplorer/DataView/StationTreeModel.cpp +++ b/Applications/DataExplorer/DataView/StationTreeModel.cpp @@ -102,10 +102,14 @@ vtkPolyDataAlgorithm* StationTreeModel::vtkSource(const std::string &name) const return nullptr; } -void StationTreeModel::setNameForItem(const std::string &stn_vec_name, std::size_t id, std::string const& item_name) +void StationTreeModel::setNameForItem(const std::string& stn_vec_name, + std::size_t id, + std::string const& item_name) { - auto const stn_list = find_if(_lists.begin(), _lists.end(), [&stn_vec_name](ModelTreeItem* item) - { return (stn_vec_name.compare( item->data(0).toString().toStdString() ) == 0); }); + auto const stn_list = find_if( + _lists.begin(), _lists.end(), [&stn_vec_name](ModelTreeItem* item) { + return (stn_vec_name == item->data(0).toString().toStdString()); + }); if (id >= (*stn_list)->childCount()) return; diff --git a/Applications/DataExplorer/DataView/StationTreeModel.h b/Applications/DataExplorer/DataView/StationTreeModel.h index de78aa234d53b90aa27fe0a5ba75b0f871e9160f..98294a1fa75e33c772248cf130659983b8c4ef6f 100644 --- a/Applications/DataExplorer/DataView/StationTreeModel.h +++ b/Applications/DataExplorer/DataView/StationTreeModel.h @@ -53,7 +53,8 @@ public: //BaseItem* itemFromIndex( const QModelIndex& index ) const; void removeStationList(QModelIndex index); void removeStationList(const std::string &name); - void setNameForItem(const std::string &stn_vec_name, std::size_t id, std::string const& item_name); + void setNameForItem(const std::string& stn_vec_name, std::size_t id, + std::string const& item_name); GeoLib::Station* stationFromIndex( const QModelIndex& index, QString &listName ) const; vtkPolyDataAlgorithm* vtkSource(const std::string &name) const;