[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenonbeta/kgeography/src
From:       Albert Astals Cid <tsdgeos () terra ! es>
Date:       2004-03-09 20:08:24
Message-ID: 20040309200824.B17E799A2 () office ! kde ! org
[Download RAW message or body]

CVS commit by aacid: 

 - Delete the created map if the parser fails
 - Don't enable the ok button in map choose dialog if there's no available map


  M +1 -0      kgeography.cpp   1.5
  M +3 -1      mapchooser.cpp   1.5


--- kdenonbeta/kgeography/src/kgeography.cpp  #1.4:1.5
@@ -49,4 +49,5 @@ kgeography::kgeography() : KMainWindow()
                 {
                         KMessageBox::error(this, i18n("Could not open last saved \
map. Error parsing %1: %2").arg(file).arg(reader.getError())); +                      \
delete reader.getMap();  openMap();
                 }

--- kdenonbeta/kgeography/src/mapchooser.cpp  #1.4:1.5
@@ -33,4 +33,5 @@ mapChooser::mapChooser(QWidget *parent) 
                 {
                         KMessageBox::error(this, i18n("Error parsing %1: \
%2").arg(*it).arg(p_reader.getError())); +                        delete \
p_reader.getMap();  }
                 else
@@ -45,5 +46,6 @@ mapChooser::mapChooser(QWidget *parent) 
         connect(p_listBox, SIGNAL(highlighted(const QString&)), this, \
SLOT(putImage(const QString&)));  connect(p_listBox, SIGNAL(selected(int)), this, \
                SLOT(slotOk()));
-        p_listBox -> setCurrentItem(0);
+        if (p_listBox -> count() > 0) p_listBox -> setCurrentItem(0);
+        else enableButtonOK(false);
         setMainWidget(hb);
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic