mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 06:55:54 -04:00
[Browser] Some minor fixes
This commit is contained in:
parent
958ff06ca8
commit
1808cf815f
@ -90,7 +90,10 @@ void MainWindow::deleteServer()
|
|||||||
int sourceId = proxyModel->mapToSource(proxyModel->index(id, ServerData::ADDR)).row();
|
int sourceId = proxyModel->mapToSource(proxyModel->index(id, ServerData::ADDR)).row();
|
||||||
favorites->removeRow(sourceId);
|
favorites->removeRow(sourceId);
|
||||||
if(favorites->myData.isEmpty())
|
if(favorites->myData.isEmpty())
|
||||||
|
{
|
||||||
actionPlay->setEnabled(false);
|
actionPlay->setEnabled(false);
|
||||||
|
actionDelete->setEnabled(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,7 +139,6 @@ void MainWindow::tabSwitched(int index)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
proxyModel->setSourceModel(favorites);
|
proxyModel->setSourceModel(favorites);
|
||||||
actionDelete->setEnabled(true);
|
|
||||||
}
|
}
|
||||||
actionPlay->setEnabled(false);
|
actionPlay->setEnabled(false);
|
||||||
actionAdd->setEnabled(false);
|
actionAdd->setEnabled(false);
|
||||||
@ -147,6 +149,8 @@ void MainWindow::serverSelected()
|
|||||||
actionPlay->setEnabled(true);
|
actionPlay->setEnabled(true);
|
||||||
if(tabWidget->currentIndex() == 0)
|
if(tabWidget->currentIndex() == 0)
|
||||||
actionAdd->setEnabled(true);
|
actionAdd->setEnabled(true);
|
||||||
|
if(tabWidget->currentIndex() == 1)
|
||||||
|
actionDelete->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::closeEvent(QCloseEvent *event)
|
void MainWindow::closeEvent(QCloseEvent *event)
|
||||||
|
@ -30,7 +30,9 @@ bool MySortFilterProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &
|
|||||||
|
|
||||||
MySortFilterProxyModel::MySortFilterProxyModel(QObject *parent) : QSortFilterProxyModel(parent)
|
MySortFilterProxyModel::MySortFilterProxyModel(QObject *parent) : QSortFilterProxyModel(parent)
|
||||||
{
|
{
|
||||||
|
filterEmpty = false;
|
||||||
|
filterFull = false;
|
||||||
|
maxPing = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MySortFilterProxyModel::filterEmptyServers(bool state)
|
void MySortFilterProxyModel::filterEmptyServers(bool state)
|
||||||
|
@ -235,6 +235,9 @@
|
|||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionPlay">
|
<action name="actionPlay">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Play</string>
|
<string>Play</string>
|
||||||
</property>
|
</property>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user