author | benmeyer <benmeyer> | 2002-07-26 18:47:13 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-07-26 18:47:13 (UTC) |
commit | 1658b161a890ee69aafac084e04776759932dbce (patch) (side-by-side diff) | |
tree | f4330f580496467a01eb6a487069fe235060a453 | |
parent | 630a8f6e4ff5eddaee0089e383c42cc198c68ced (diff) | |
download | opie-1658b161a890ee69aafac084e04776759932dbce.zip opie-1658b161a890ee69aafac084e04776759932dbce.tar.gz opie-1658b161a890ee69aafac084e04776759932dbce.tar.bz2 |
bug fix
-rw-r--r-- | noncore/settings/tabmanager/tabmanager.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/noncore/settings/tabmanager/tabmanager.cpp b/noncore/settings/tabmanager/tabmanager.cpp index 5f0899c..c9d7aed 100644 --- a/noncore/settings/tabmanager/tabmanager.cpp +++ b/noncore/settings/tabmanager/tabmanager.cpp @@ -268,48 +268,51 @@ void TabManager::editItem( QListViewItem * item){ if(fileName.right(4) == ".png"){ fileName = fileName.mid(0,fileName.length()-4); QPixmap imageOfFile(Resource::loadPixmap(fileName)); QImage foo = imageOfFile.convertToImage(); foo = foo.smoothScale(16,16); imageOfFile.convertFromImage(foo); application->iconLineEdit->insertItem(imageOfFile,fileName); } //qDebug(fi->fileName().latin1()); ++it; } waitDialog.hide(); } int pixmap = -1; QString pixmapText = app.pixmapString(); QComboBox *f = application->iconLineEdit; for(int i = 0; i < application->iconLineEdit->count(); i++){ if(f->text(i) == pixmapText){ pixmap = i; break; } } if(pixmap != -1) application->iconLineEdit->setCurrentItem(pixmap); + else if(pixmapText.isEmpty()){ + application->iconLineEdit->setCurrentItem(0); + } else{ QPixmap imageOfFile(Resource::loadPixmap(pixmapText)); QImage foo = imageOfFile.convertToImage(); foo = foo.smoothScale(16,16); imageOfFile.convertFromImage(foo); application->iconLineEdit->insertItem(imageOfFile,pixmapText,0); application->iconLineEdit->setCurrentItem(0); } application->nameLineEdit->setText(app.name()); application->execLineEdit->setText(app.exec()); application->commentLineEdit->setText(app.comment()); if(item->parent() == NULL){ application->execLineEdit->setEnabled(false); application->TextLabel3->setEnabled(false); application->setCaption(tr("Tab")); } else{ application->execLineEdit->setEnabled(true); application->TextLabel3->setEnabled(true); application->setCaption(tr("Application")); } |