From 99ccdda218112cfb0f7371fa05d7a696b8da1c40 Mon Sep 17 00:00:00 2001 From: zecke Date: Tue, 11 Feb 2003 17:26:51 +0000 Subject: fix bug 0000591 AppLnk does not need to reload all labels but it needs to reload the names for the ids in mCat --- diff --git a/library/applnk.cpp b/library/applnk.cpp index 5763c62..35822dd 100644 --- a/library/applnk.cpp +++ b/library/applnk.cpp @@ -89,7 +89,11 @@ public: { Categories cat( 0 ); cat.load( categoryFileName() ); - mCatList = cat.labels("Document View",mCat); + // we need to update the names for the mCat... to mCatList + mCatList.clear(); + for (uint i = 0; i < mCat.count(); i++ ) + mCatList << cat.label("Document View", mCat[i] ); + } void setCatArrayDirty() @@ -406,6 +410,7 @@ AppLnk::AppLnk( const QString &file ) AppLnk& AppLnk::operator=(const AppLnk ©) { + if ( this == © ) return *this; if ( mId ) qWarning("Deleting AppLnk that is in an AppLnkSet"); if ( d ) @@ -850,7 +855,7 @@ void AppLnk::storeLink() const if(!rotation().isEmpty()) config.writeEntry("Rotation",rotation()); else - config.removeEntry("Rotation"); + config.removeEntry("Rotation"); if ( !mComment.isNull() ) config.writeEntry("Comment",mComment); QString f = file(); int i = 0; -- cgit v0.9.0.2