From 1abbc78a31dba19fd803eccfdda65cd40594dc3b Mon Sep 17 00:00:00 2001 From: legatvs Date: Tue, 10 Mar 2009 22:35:39 +0200 Subject: [PATCH] Fix lost formatCombo selection when focus is shifted from urlEdit. --- src/mainwnd.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mainwnd.cpp b/src/mainwnd.cpp index e6b3805..d251d23 100644 --- a/src/mainwnd.cpp +++ b/src/mainwnd.cpp @@ -316,8 +316,14 @@ MainWindow::onURLEditingFinished() { } } + QString last = formatCombo->currentText(); + formatCombo->clear(); formatCombo->addItems(formats); + + int n = formatCombo->findText(last); + if (n != -1) + formatCombo->setCurrentIndex(n); } void -- 2.11.4.GIT