diff --git a/kdesktop/kdiconview.cc b/kdesktop/kdiconview.cc index 4124a3e8e..fa7a9d7d0 100644 --- a/kdesktop/kdiconview.cc +++ b/kdesktop/kdiconview.cc @@ -237,11 +237,11 @@ void KDIconView::initDotDirectories() for ( TQStringList::ConstIterator it = dirs.begin() ; it != dirs.end() ; ++it ) { kdDebug(1204) << "KDIconView::initDotDirectories found dir " << *it << endl; - TQString dotFileName = *it + "/.directory"; + TQString localDotFileName = *it + "/.directory"; - if (TQFile::exists(dotFileName)) + if (TQFile::exists(localDotFileName)) { - KSimpleConfig dotDir(dotFileName, true); // Read only + KSimpleConfig dotDir(localDotFileName, true); // Read only TQStringList groups = dotDir.groupList(); TQStringList::ConstIterator gIt = groups.begin(); @@ -1019,6 +1019,11 @@ void KDIconView::slotNewItems( const KFileItemList & entries ) KFileItemListIterator it(entries); KFileIVI* fileIVI = 0L; + // Ensure that the saved positions had a chance to be loaded + if (!m_dotDirectory) { + initDotDirectories(); + } + if (m_nextItemPos.isNull() && !m_dotDirectory) { // Not found, we'll need to save the new pos kdDebug(1214)<<"Neither a drop position stored nor m_dotDirectory set"<