mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 22:45:34 +00:00
[Browser] Some minor fixes
This commit is contained in:
parent
958ff06ca8
commit
1808cf815f
3 changed files with 11 additions and 2 deletions
|
@ -90,7 +90,10 @@ void MainWindow::deleteServer()
|
|||
int sourceId = proxyModel->mapToSource(proxyModel->index(id, ServerData::ADDR)).row();
|
||||
favorites->removeRow(sourceId);
|
||||
if(favorites->myData.isEmpty())
|
||||
{
|
||||
actionPlay->setEnabled(false);
|
||||
actionDelete->setEnabled(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -136,7 +139,6 @@ void MainWindow::tabSwitched(int index)
|
|||
else
|
||||
{
|
||||
proxyModel->setSourceModel(favorites);
|
||||
actionDelete->setEnabled(true);
|
||||
}
|
||||
actionPlay->setEnabled(false);
|
||||
actionAdd->setEnabled(false);
|
||||
|
@ -147,6 +149,8 @@ void MainWindow::serverSelected()
|
|||
actionPlay->setEnabled(true);
|
||||
if(tabWidget->currentIndex() == 0)
|
||||
actionAdd->setEnabled(true);
|
||||
if(tabWidget->currentIndex() == 1)
|
||||
actionDelete->setEnabled(true);
|
||||
}
|
||||
|
||||
void MainWindow::closeEvent(QCloseEvent *event)
|
||||
|
|
|
@ -30,7 +30,9 @@ bool MySortFilterProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &
|
|||
|
||||
MySortFilterProxyModel::MySortFilterProxyModel(QObject *parent) : QSortFilterProxyModel(parent)
|
||||
{
|
||||
|
||||
filterEmpty = false;
|
||||
filterFull = false;
|
||||
maxPing = 0;
|
||||
}
|
||||
|
||||
void MySortFilterProxyModel::filterEmptyServers(bool state)
|
||||
|
|
|
@ -235,6 +235,9 @@
|
|||
</property>
|
||||
</action>
|
||||
<action name="actionPlay">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Play</string>
|
||||
</property>
|
||||
|
|
Loading…
Reference in a new issue