┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Paul St James <[email protected]>2009-01-23 18:55:08 +0000
committerSimon Paul St James <[email protected]>2009-01-23 18:55:08 +0000
commit5b8a817a7328fddbee654721cdb93b560a81f4c5 (patch)
tree04c8ec77c25bfe0d136c0e59cdd03093fbb72fcc /src
parent5b5f0c9d7e5887e39b9dcf080899ca52de4e973f (diff)
In rare circumstances (a very narrow viewport is a necessary, but not sufficient, condition) DolphinDetailsView::resizeColumns() is called with an empty model so that sizeHintForColumn(...) returns -1 and so the name column ultimately has width -1. Detect and prevent this.
svn path=/trunk/KDE/kdebase/apps/; revision=915781
Diffstat (limited to 'src')
-rw-r--r--src/dolphindetailsview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp
index acfff6a65..21737c840 100644
--- a/src/dolphindetailsview.cpp
+++ b/src/dolphindetailsview.cpp
@@ -900,7 +900,7 @@ void DolphinDetailsView::resizeColumns()
// reasons the exact necessary width for full visible names is
// only checked for up to 200 items:
const int rowCount = model()->rowCount();
- if (rowCount < 200) {
+ if (rowCount > 0 && rowCount < 200) {
const int nameWidth = sizeHintForColumn(DolphinModel::Name);
if (nameWidth + requiredWidth <= viewport()->width()) {
columnWidth[KDirModel::Name] = viewport()->width() - requiredWidth;