summaryrefslogtreecommitdiffstats
path: root/kdesktop/kdiconview.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-21 21:50:42 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-21 21:50:42 +0000
commitd02bf7a4ff7f823e15ea2c148f5bdf0b4727a74b (patch)
tree3d4a34c479d815c26a9905734bc81313cad4ab3d /kdesktop/kdiconview.cc
parentb3227b675d733c6e88cdadec7d8ab524b2c8b040 (diff)
downloadtdebase-d02bf7a4ff7f823e15ea2c148f5bdf0b4727a74b.tar.gz
tdebase-d02bf7a4ff7f823e15ea2c148f5bdf0b4727a74b.zip
Fix desktop icon wandering once and for all!
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1177990 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdesktop/kdiconview.cc')
-rw-r--r--kdesktop/kdiconview.cc17
1 files changed, 11 insertions, 6 deletions
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"<<endl;
@@ -1496,9 +1501,6 @@ void KDIconView::updateWorkArea( const TQRect &wr )
if (( iconArea() == wr ) && (m_needDesktopAlign == false)) return; // nothing changed; avoid repaint/saveIconPosition ...
- m_needDesktopAlign = false;
- lineupIcons();
-
TQRect oldArea = iconArea();
setIconArea( wr );
@@ -1554,6 +1556,9 @@ void KDIconView::updateWorkArea( const TQRect &wr )
saveIconPositions();
}
}
+
+ m_needDesktopAlign = false;
+ lineupIcons();
}
void KDIconView::setupSortKeys()