┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2012-03-25 22:56:13 +0200
committerPeter Penz <[email protected]>2012-03-25 22:58:16 +0200
commite70c2f8aa472c01433f9416c363c698677c5b45f (patch)
tree46ae0ce49bf98749ce3a3d6a4b06e6129a7c706d /src/views
parent1cbe55b97c3b8fd9265ad6b40ce6cc169d4451c1 (diff)
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.
Diffstat (limited to 'src/views')
-rw-r--r--src/views/dolphinview.cpp10
1 files changed, 5 insertions, 5 deletions
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<int>());
- header->setAutomaticColumnResizing(true);
+ QList<int> columnWidths;
+ foreach (const QByteArray& role, view->visibleRoles()) {
+ columnWidths.append(header->columnWidth(role));
+ }
+ props.setHeaderColumnWidths(columnWidths);
}
}