diff options
| author | Kevin Smith <git@kismith.co.uk> | 2009-08-29 20:34:11 (GMT) | 
|---|---|---|
| committer | Kevin Smith <git@kismith.co.uk> | 2009-08-29 20:34:11 (GMT) | 
| commit | 0d6f71fadac786fb94302e8f5762e37f7e598e53 (patch) | |
| tree | 9f06ffbbbb4fb06a88de49910485ac651c8c94df | |
| parent | 030c2d8a448dbf17808b840df1d0379639867e99 (diff) | |
| download | swift-0d6f71fadac786fb94302e8f5762e37f7e598e53.zip swift-0d6f71fadac786fb94302e8f5762e37f7e598e53.tar.bz2 | |
Finally sticky roster group expansion.
| -rw-r--r-- | Swift/QtUI/Roster/QtTreeWidget.cpp | 2 | ||||
| -rw-r--r-- | Swift/QtUI/Roster/RosterDelegate.cpp | 2 | ||||
| -rw-r--r-- | Swift/QtUI/Roster/RosterModel.cpp | 1 | 
3 files changed, 3 insertions, 2 deletions
| diff --git a/Swift/QtUI/Roster/QtTreeWidget.cpp b/Swift/QtUI/Roster/QtTreeWidget.cpp index 75863fc..7caa150 100644 --- a/Swift/QtUI/Roster/QtTreeWidget.cpp +++ b/Swift/QtUI/Roster/QtTreeWidget.cpp @@ -80,8 +80,8 @@ void QtTreeWidget::handleDataChanged(const QModelIndex& topLeft, const QModelInd  	}  	QtTreeWidgetItem* qtItem = static_cast<QtTreeWidgetItem*>(topLeft.internalPointer());  	if (qtItem) { -		//qDebug() << "Item changed, passing expanded state to view: " << qtItem->isExpanded();  		setExpanded(topLeft, qtItem->isExpanded()); +		//qDebug() << "Item changed, passing expanded state to view: " << qtItem->isExpanded() << " giving an expanded state of " << isExpanded(topLeft);  	}  } diff --git a/Swift/QtUI/Roster/RosterDelegate.cpp b/Swift/QtUI/Roster/RosterDelegate.cpp index c14f170..659f360 100644 --- a/Swift/QtUI/Roster/RosterDelegate.cpp +++ b/Swift/QtUI/Roster/RosterDelegate.cpp @@ -99,7 +99,7 @@ void RosterDelegate::paintGroup(QPainter* painter, const QStyleOptionViewItem& o  		contactCountWidth = groupMetrics.width(countString) + 2 * horizontalMargin_;  		int offsetAmount = textRect.width() - contactCountWidth + horizontalMargin_;  		QRect countRect = textRect.adjusted(offsetAmount, 0, 0/*-1 * offsetAmount*/, 0); -		qDebug() << "Painting count string " << countString << " at " << countRect << " from offset " << offsetAmount; +		//qDebug() << "Painting count string " << countString << " at " << countRect << " from offset " << offsetAmount;  		paintShadowText(painter, countRect, countString);  	}  	QRect nameTextRect = textRect.adjusted(0, 0, contactCountWidth, 0); diff --git a/Swift/QtUI/Roster/RosterModel.cpp b/Swift/QtUI/Roster/RosterModel.cpp index f54290a..8a319ea 100644 --- a/Swift/QtUI/Roster/RosterModel.cpp +++ b/Swift/QtUI/Roster/RosterModel.cpp @@ -24,6 +24,7 @@ void RosterModel::handleItemChanged(QtTreeWidgetItem* item) {  	Q_ASSERT(modelIndex.isValid());  	emit itemExpanded(modelIndex, item->isExpanded());  	emit dataChanged(modelIndex, modelIndex); +	emit dataChanged(parent(modelIndex), parent(modelIndex));  	emit layoutChanged();  } | 
 Swift
 Swift