mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
refs #735, allow to reset highlighting
(some leftovers of DB object highlighting also deleted)
This commit is contained in:
committed by
Mathew Sutcliffe
parent
2434c7bbe2
commit
b324a26747
@@ -36,18 +36,8 @@ namespace BlackGui
|
||||
QVariant CListModelDbObjects<ObjectType, ContainerType, KeyType, UseCompare>::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
if (role != Qt::BackgroundRole) { return CListModelBase<ObjectType, ContainerType, UseCompare>::data(index, role); }
|
||||
|
||||
if (isHighlightIndex(index)) { return QBrush(m_highlightColor); }
|
||||
if (!highlightDbData()) { return CListModelBase<ObjectType, ContainerType, UseCompare>::data(index, role); }
|
||||
|
||||
const ObjectType obj(this->at(index));
|
||||
// highlight DB models
|
||||
if (obj.hasValidDbKey())
|
||||
{
|
||||
static const QBrush b(Qt::green);
|
||||
return b;
|
||||
}
|
||||
return QVariant();
|
||||
return CListModelBase<ObjectType, ContainerType, UseCompare>::data(index, role);
|
||||
}
|
||||
|
||||
template <typename ObjectType, typename ContainerType, typename KeyType, bool UseCompare>
|
||||
|
||||
Reference in New Issue
Block a user