From 27749486e2aec15fe90b2dfea67d1e8e36a2f54f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 24 Jan 2012 08:33:01 +0530 Subject: [PATCH] On first run of calibre, ensure the columns are sized appropriately --- src/calibre/gui2/ui.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/gui2/ui.py b/src/calibre/gui2/ui.py index a725d78b07..f34d8cbad1 100644 --- a/src/calibre/gui2/ui.py +++ b/src/calibre/gui2/ui.py @@ -292,6 +292,8 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{ self.library_view.model().books_added(1) if hasattr(self, 'db_images'): self.db_images.reset() + if self.library_view.model().rowCount(None) < 3: + self.library_view.resizeColumnsToContents() self.library_view.model().count_changed() self.bars_manager.database_changed(self.library_view.model().db)