On first run of calibre, ensure the columns are sized appropriately

This commit is contained in:
Kovid Goyal 2012-01-24 08:33:01 +05:30
parent db4416a736
commit 27749486e2

View File

@ -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)