mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
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
This commit is contained in:
parent
5b5f0c9d7e
commit
5b8a817a73
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue