# HG changeset patch # User Teemu Piippo # Date 1522520602 -10800 # Node ID 3f917410e977ac26417f16bf193184adfacc123d # Parent f6a3640b18182ea6aaaa1a04070009fa1654895a show subfile descriptions in the object list diff -r f6a3640b1818 -r 3f917410e977 src/mainwindow.ui --- a/src/mainwindow.ui Fri Mar 30 14:30:51 2018 +0300 +++ b/src/mainwindow.ui Sat Mar 31 21:23:22 2018 +0300 @@ -47,8 +47,8 @@ 0 0 - 871 - 364 + 98 + 28 @@ -70,8 +70,8 @@ 0 0 - 871 - 364 + 926 + 389 @@ -86,6 +86,9 @@ 0 + + true + QAbstractItemView::ExtendedSelection @@ -98,8 +101,8 @@ 0 0 - 871 - 364 + 227 + 126 @@ -202,8 +205,8 @@ 0 0 - 871 - 364 + 98 + 93 @@ -236,7 +239,7 @@ 0 0 1010 - 31 + 26 @@ -1766,7 +1769,6 @@ - diff -r f6a3640b1818 -r 3f917410e977 src/model.cpp --- a/src/model.cpp Fri Mar 30 14:30:51 2018 +0300 +++ b/src/model.cpp Sat Mar 31 21:23:22 2018 +0300 @@ -21,6 +21,7 @@ #include "documentmanager.h" #include "generics/migrate.h" #include "editHistory.h" +#include "lddocument.h" Model::Model(DocumentManager* manager) : QAbstractListModel {manager}, @@ -311,6 +312,14 @@ if (object->isInverted()) result.prepend("↺ "); + if (object->type() == LDObjectType::SubfileReference) + { + LDSubfileReference* reference = static_cast(object); + LDDocument* subfile = reference->fileInfo(this->documentManager()); + if (subfile != nullptr) + result.prepend(subfile->header.description + "\n"); + } + return result; }