[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Fri Jul 9 22:27:36 CEST 2004
CVS commit by staikos:
- don't update if the combo is empty (fixes Qt warning)
- don't update if the combo is open
M +13 -7 kstviewfitsdialog_i.cpp 1.4
--- kdeextragear-2/kst/kst/kstviewfitsdialog_i.cpp #1.3:1.4
@@ -16,12 +16,14 @@
***************************************************************************/
+#include <qcombobox.h>
#include <qlabel.h>
#include <qlayout.h>
+#include <qlistbox.h>
+#include <qmessagebox.h>
#include <qpushbutton.h>
#include <qstring.h>
#include <qtable.h>
+#include <qtimer.h>
#include <qwidget.h>
-#include <qmessagebox.h>
-#include <qcombobox.h>
#include <kdebug.h>
@@ -78,10 +80,14 @@ void KstViewFitsDialogI::fillComboBox( c
void KstViewFitsDialogI::updateViewFitsDialog() {
- QString old;
- int iIndex;
+ if (_comboBoxFits->listBox()->isVisible()) {
+ QTimer::singleShot(250, this, SLOT(updateViewFitsDialog()));
+ return;
+ }
- iIndex = _comboBoxFits->currentItem();
- old = _comboBoxFits->text( iIndex );
+ if (_comboBoxFits->count() > 0) {
+ int iIndex = _comboBoxFits->currentItem();
+ QString old = _comboBoxFits->text( iIndex );
fillComboBox( old );
+ }
}
More information about the Kst
mailing list