Skip to content

Commit

Permalink
move spelcheck header addition to after column sizing
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinhendricks committed Dec 20, 2024
1 parent 11cbd8d commit f4be077
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Dialogs/SpellcheckEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,6 @@ void SpellcheckEditor::CreateModel(int sort_column, Qt::SortOrder sort_order)
header.append(tr("Count"));
header.append(tr("Language"));
header.append(tr("Misspelled?"));
m_SpellcheckEditorModel->setHorizontalHeaderLabels(header);
ui.SpellcheckEditorTree->header()->setSectionResizeMode(0, QHeaderView::Stretch);

QHash<QString, int> unique_words = m_Book->GetUniqueWordsInHTMLFiles();

Expand Down Expand Up @@ -325,6 +323,9 @@ void SpellcheckEditor::CreateModel(int sort_column, Qt::SortOrder sort_order)
ui.SpellcheckEditorTree->resizeColumnToContents(2);
ui.SpellcheckEditorTree->resizeColumnToContents(3);

m_SpellcheckEditorModel->setHorizontalHeaderLabels(header);
ui.SpellcheckEditorTree->header()->setSectionResizeMode(0, QHeaderView::Stretch);

// Changing the sortIndicator order should not cause the entire wordlist to be regenerated
// disconnect(ui.SpellcheckEditorTree->header(), SIGNAL(sortIndicatorChanged(int, Qt::SortOrder)), this, SLOT(Sort(int, Qt::SortOrder)));

Expand Down

0 comments on commit f4be077

Please sign in to comment.