Fix issues related to tab order in main window

Make sure the search input has focus when switching to the search tab
This commit is contained in:
Christophe Dumez
2010-07-19 18:49:53 +00:00
parent 51068294f1
commit bceb00d35f
7 changed files with 30 additions and 16 deletions

View File

@@ -486,7 +486,7 @@ void TransferListWidget::refreshList(bool force) {
// Stop updating the display
setUpdatesEnabled(false);
// Refresh only if displayed
if(!force && main_window->getCurrentTabIndex() != TAB_TRANSFER) return;
if(!force && main_window->getCurrentTabWidget() != this) return;
unsigned int nb_downloading = 0, nb_seeding=0, nb_active=0, nb_inactive = 0, nb_paused = 0;
if(BTSession->getSession()->get_torrents().size() != (uint)listModel->rowCount()) {
// Oups, we have torrents that are not displayed, fix this
@@ -695,7 +695,7 @@ void TransferListWidget::pauseAllTorrents() {
}
void TransferListWidget::deleteSelectedTorrents() {
if(main_window->getCurrentTabIndex() != TAB_TRANSFER) return;
if(main_window->getCurrentTabWidget() != this) return;
const QStringList& hashes = getSelectedTorrentsHashes();
if(!hashes.empty()) {
bool delete_local_files = false;