Skip to content

Commit

Permalink
Check scene plugin header before adjusting column sizes
Browse files Browse the repository at this point in the history
Signed-off-by: Geoff Hutchison <[email protected]>
  • Loading branch information
ghutchis committed Jan 9, 2024
1 parent a7d4136 commit 8ededde
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion avogadro/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,8 @@ void MainWindow::setupInterface()
m_sceneTreeView->setAlternatingRowColors(true);
m_sceneTreeView->header()->setStretchLastSection(false);
m_sceneTreeView->header()->setVisible(false);
m_sceneTreeView->header()->setSectionResizeMode(0, QHeaderView::Stretch);
if (m_sceneTreeView->header()->count() > 0)
m_sceneTreeView->header()->setSectionResizeMode(0, QHeaderView::Stretch);
connect(m_sceneTreeView, &QAbstractItemView::activated, this,
&MainWindow::sceneItemActivated);
connect(m_sceneTreeView, &QAbstractItemView::clicked, this,
Expand Down

0 comments on commit 8ededde

Please sign in to comment.