From e70c2f8aa472c01433f9416c363c698677c5b45f Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sun, 25 Mar 2012 22:56:13 +0200 Subject: Details view: Don't reset to automatic resizing when adding columns Until now when a new column is added in the case where custom column widths are used, the automatic resizing has been turned on again. The patch fixes this so that the current widths stay and the new column gets a proper default width. --- src/views/dolphinview.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/views/dolphinview.cpp') diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 8672b531b..c9af2248a 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -844,7 +844,6 @@ void DolphinView::slotHeaderContextMenuRequested(const QPointF& pos) foreach (const QByteArray& role, view->visibleRoles()) { columnWidths.append(header->columnWidth(role)); } - props.setHeaderColumnWidths(columnWidths); header->setAutomaticColumnResizing(false); } else { @@ -861,10 +860,11 @@ void DolphinView::slotHeaderContextMenuRequested(const QPointF& pos) view->setVisibleRoles(visibleRoles); props.setVisibleRoles(visibleRoles); - // Reset the stored column-widths, so that automatic resizing is - // used again. - props.setHeaderColumnWidths(QList()); - header->setAutomaticColumnResizing(true); + QList columnWidths; + foreach (const QByteArray& role, view->visibleRoles()) { + columnWidths.append(header->columnWidth(role)); + } + props.setHeaderColumnWidths(columnWidths); } } -- cgit v1.3