Skip to content

Commit

Permalink
Sidebar: use item label for tooltip, show id when debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Aug 26, 2021
1 parent f2258d1 commit a736075
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/library/sidebarmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "library/treeitem.h"
#include "moc_sidebarmodel.cpp"
#include "util/assert.h"
#include "util/cmdlineargs.h"

namespace {

Expand Down Expand Up @@ -254,11 +255,11 @@ QVariant SidebarModel::data(const QModelIndex& index, int role) const {
case Qt::DisplayRole:
return pTreeItem->getLabel();
case Qt::ToolTipRole: {
// If it's the "Quick Links" node, display it's name
if (pTreeItem->getData().toString() == QUICK_LINK_NODE) {
return pTreeItem->getLabel();
if (CmdlineArgs::Instance().getDeveloper()) {
// Display the internal data for debugging
return pTreeItem->getData();
}
return pTreeItem->getData();
return pTreeItem->getLabel();
}
case Qt::FontRole: {
QFont font;
Expand Down

0 comments on commit a736075

Please sign in to comment.