[Browser] Some minor fixes

pull/163/head
Koncord 8 years ago
parent 958ff06ca8
commit 1808cf815f

@ -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…
Cancel
Save