From 669ea376561424a9e653502670b464cb7162d919 Mon Sep 17 00:00:00 2001 From: Carsten Pfeiffer Date: Sun, 11 Feb 2001 14:39:55 +0000 Subject: [PATCH] don't change the icon when canceling the icondialog QString newIcon = dlg.selectIcon(KIcon::Small, KIcon::FileSystem); + if ( !newIcon.isEmpty() ) { EditCommand * cmd = new EditCommand( i18n("Icon change"), bk.address(), EditCommand::Edition("icon", newIcon) ); m_commandHistory.addCommand( cmd ); + } svn path=/trunk/kdebase/konqueror/keditbookmarks/; revision=82369 --- keditbookmarks/toplevel.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/keditbookmarks/toplevel.cpp b/keditbookmarks/toplevel.cpp index fecdaee724..64469c7f8a 100644 --- a/keditbookmarks/toplevel.cpp +++ b/keditbookmarks/toplevel.cpp @@ -512,9 +512,11 @@ void KEBTopLevel::slotChangeIcon() ASSERT(!bk.isNull()); KIconDialog dlg(this); QString newIcon = dlg.selectIcon(KIcon::Small, KIcon::FileSystem); - EditCommand * cmd = new EditCommand( i18n("Icon change"), bk.address(), - EditCommand::Edition("icon", newIcon) ); - m_commandHistory.addCommand( cmd ); + if ( !newIcon.isEmpty() ) { + EditCommand * cmd = new EditCommand( i18n("Icon change"), bk.address(), + EditCommand::Edition("icon", newIcon) ); + m_commandHistory.addCommand( cmd ); + } } void KEBTopLevel::slotDropped (QDropEvent* e, QListViewItem * _newParent, QListViewItem * _afterNow)