mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 20:44:15 +00: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
@ -133,6 +133,9 @@ QString TorrentCategoryDialog::categoryName() const
|
|||||||
void TorrentCategoryDialog::setCategoryName(const QString &categoryName)
|
void TorrentCategoryDialog::setCategoryName(const QString &categoryName)
|
||||||
{
|
{
|
||||||
m_ui->textCategoryName->setText(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
|
BitTorrent::CategoryOptions TorrentCategoryDialog::categoryOptions() const
|
||||||
|
@ -29,13 +29,10 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="1" column="1">
|
<item row="0" column="0">
|
||||||
<widget class="FileSystemPathComboEdit" name="comboSavePath" native="true">
|
<widget class="QLabel" name="labelCategoryName">
|
||||||
<property name="sizePolicy">
|
<property name="text">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
<string>Name:</string>
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -49,10 +46,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="1" column="1">
|
||||||
<widget class="QLabel" name="labelCategoryName">
|
<widget class="FileSystemPathComboEdit" name="comboSavePath" native="true">
|
||||||
<property name="text">
|
<property name="sizePolicy">
|
||||||
<string>Name:</string>
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -173,6 +173,12 @@
|
|||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
|
<tabstops>
|
||||||
|
<tabstop>textCategoryName</tabstop>
|
||||||
|
<tabstop>comboSavePath</tabstop>
|
||||||
|
<tabstop>comboUseDownloadPath</tabstop>
|
||||||
|
<tabstop>comboDownloadPath</tabstop>
|
||||||
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
<connection>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user