mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
Handle root index changing in RDHeaderView - refresh section sizes
This commit is contained in:
@@ -467,6 +467,21 @@ void RDHeaderView::setColumnStretchHints(const QList<int> &hints)
|
||||
resizeSectionsWithHints();
|
||||
}
|
||||
|
||||
void RDHeaderView::setRootIndex(const QModelIndex &index)
|
||||
{
|
||||
QHeaderView::setRootIndex(index);
|
||||
|
||||
// need to enqueue this after the root index is actually processed (this function is called
|
||||
// *before* the root index changes).
|
||||
if(!m_sectionStretchHints.isEmpty())
|
||||
{
|
||||
GUIInvoke::defer([this]() {
|
||||
cacheSectionMinSizes();
|
||||
resizeSectionsWithHints();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void RDHeaderView::headerDataChanged(Qt::Orientation orientation, int logicalFirst, int logicalLast)
|
||||
{
|
||||
if(m_customSizing)
|
||||
|
||||
@@ -67,6 +67,7 @@ public:
|
||||
void setCustomSizing(bool sizing) { m_customSizing = sizing; }
|
||||
int pinnedWidth() { return m_pinnedWidth; }
|
||||
public slots:
|
||||
void setRootIndex(const QModelIndex &index) override;
|
||||
void headerDataChanged(Qt::Orientation orientation, int logicalFirst, int logicalLast);
|
||||
void columnsInserted(const QModelIndex &parent, int first, int last);
|
||||
void rowsChanged(const QModelIndex &parent, int first, int last);
|
||||
|
||||
Reference in New Issue
Block a user