mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
Correctly restore 'name' column width when loading magnet links in the 'Add new torrent dialog'. Closes #1334.
This commit is contained in:
parent
260ed50f10
commit
37b048f2ab
2 changed files with 4 additions and 3 deletions
|
@ -104,9 +104,7 @@ void AddNewTorrentDialog::loadState()
|
|||
{
|
||||
QIniSettings settings;
|
||||
settings.beginGroup(QString::fromUtf8("AddNewTorrentDialog"));
|
||||
QByteArray state = settings.value("treeHeaderState").toByteArray();
|
||||
if (!state.isEmpty())
|
||||
ui->content_tree->header()->restoreState(state);
|
||||
m_headerState = settings.value("treeHeaderState").toByteArray();
|
||||
int width = settings.value("width", -1).toInt();
|
||||
if (width >= 0) {
|
||||
QRect geo = geometry();
|
||||
|
@ -664,6 +662,8 @@ void AddNewTorrentDialog::setupTreeview() {
|
|||
|
||||
// List files in torrent
|
||||
m_contentModel->model()->setupModelData(*m_torrentInfo);
|
||||
if (!m_headerState.isEmpty())
|
||||
ui->content_tree->header()->restoreState(m_headerState);
|
||||
|
||||
// Expand root folder
|
||||
ui->content_tree->setExpanded(m_contentModel->index(0, 0), true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue