mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
Apply correct tab order to Category options dialog
Also pre-select (sub)category name for editing when dialog is opened for creating new (sub)category. PR #18270. Closes #18265.
This commit is contained in:
parent
3f39bd9f35
commit
ebad387c1a
2 changed files with 20 additions and 11 deletions
|
@ -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
|
||||
|
|
|
@ -29,13 +29,10 @@
|
|||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="1">
|
||||
<widget class="FileSystemPathComboEdit" name="comboSavePath" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labelCategoryName">
|
||||
<property name="text">
|
||||
<string>Name:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -49,10 +46,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labelCategoryName">
|
||||
<property name="text">
|
||||
<string>Name:</string>
|
||||
<item row="1" column="1">
|
||||
<widget class="FileSystemPathComboEdit" name="comboSavePath" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -173,6 +173,12 @@
|
|||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>textCategoryName</tabstop>
|
||||
<tabstop>comboSavePath</tabstop>
|
||||
<tabstop>comboUseDownloadPath</tabstop>
|
||||
<tabstop>comboDownloadPath</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue