diff --git a/src/gui/torrentcategorydialog.cpp b/src/gui/torrentcategorydialog.cpp index 34cdce354..ccbc3bd62 100644 --- a/src/gui/torrentcategorydialog.cpp +++ b/src/gui/torrentcategorydialog.cpp @@ -133,6 +133,9 @@ QString TorrentCategoryDialog::categoryName() const void TorrentCategoryDialog::setCategoryName(const QString &categoryName) { m_ui->textCategoryName->setText(categoryName); + + const int subcategoryNameStart = categoryName.lastIndexOf(u"/") + 1; + m_ui->textCategoryName->setSelection(subcategoryNameStart, (categoryName.size() - subcategoryNameStart)); } BitTorrent::CategoryOptions TorrentCategoryDialog::categoryOptions() const diff --git a/src/gui/torrentcategorydialog.ui b/src/gui/torrentcategorydialog.ui index 7eaaa7909..2a9c785ef 100644 --- a/src/gui/torrentcategorydialog.ui +++ b/src/gui/torrentcategorydialog.ui @@ -29,13 +29,10 @@ - - - - - 0 - 0 - + + + + Name: @@ -49,10 +46,13 @@ - - - - Name: + + + + + 0 + 0 + @@ -173,6 +173,12 @@ 1 + + textCategoryName + comboSavePath + comboUseDownloadPath + comboDownloadPath +