Send expandedChanged if expanded state changes.

If this is not done the timeline isn't immediately redrawn when the
category is expanded, which leads to stale data being shown.

Change-Id: If8da6dbe5c8124105e1e15fb5129df906114723f
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Ulf Hermann
2013-12-02 14:35:45 +01:00
parent ab17b3ea6e
commit b623da3b2e

View File

@@ -109,7 +109,10 @@ bool PixmapCacheModel::expanded(int ) const
void PixmapCacheModel::setExpanded(int category, bool expanded)
{
Q_UNUSED(category);
bool prev_expanded = d->isExpanded;
d->isExpanded = expanded;
if (prev_expanded != expanded)
emit expandedChanged();
}
int PixmapCacheModel::categoryDepth(int categoryIndex) const