Save (works) and reload (doesn't work) placefiles from settings

This commit is contained in:
Dan Paulat 2023-08-23 01:06:51 -05:00
parent ad5c2b583d
commit 6f14745a59
3 changed files with 158 additions and 18 deletions

View file

@ -159,14 +159,11 @@ QVariant PlacefileModel::data(const QModelIndex& index, int role) const
role == Qt::ItemDataRole::ToolTipRole)
{
std::string description = placefileName;
auto placefile = p->placefileManager_->placefile(placefileName);
if (placefile != nullptr)
std::string title =
p->placefileManager_->placefile_title(placefileName);
if (!title.empty())
{
std::string title = placefile->title();
if (!title.empty())
{
description = title + '\n' + description;
}
description = title + '\n' + description;
}
return QString::fromStdString(description);