summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-20 07:35:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-20 07:35:47 +0000
commit5116f6efd12d4bda005d5ec50181bc21ed36659d (patch)
tree8370b104cb805825c2d4dd74f9f892cd2161dbbe
parentde908a3f4fcafa4f71ee10b07c6ff83a00c80ac8 (diff)
downloadtdebase-5116f6efd12d4bda005d5ec50181bc21ed36659d.tar.gz
tdebase-5116f6efd12d4bda005d5ec50181bc21ed36659d.zip
Fix irritating bug where desktop icons do not align to grid on startup when align to grid is selected for the desktop view
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1177325 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--kdesktop/kdiconview.cc8
-rw-r--r--kdesktop/kdiconview.h2
2 files changed, 8 insertions, 2 deletions
diff --git a/kdesktop/kdiconview.cc b/kdesktop/kdiconview.cc
index 75e8d10a7..e3b005b73 100644
--- a/kdesktop/kdiconview.cc
+++ b/kdesktop/kdiconview.cc
@@ -147,7 +147,8 @@ KDIconView::KDIconView( TQWidget *parent, const char* name )
m_eSortCriterion( NameCaseInsensitive ),
m_bSortDirectoriesFirst( true ),
m_itemsAlwaysFirst(),
- m_gotIconsArea(false)
+ m_gotIconsArea(false),
+ m_needDesktopAlign(true)
{
setResizeMode( Fixed );
setIconArea( desktopRect() ); // the default is the whole desktop
@@ -1493,7 +1494,10 @@ void KDIconView::updateWorkArea( const TQRect &wr )
{
m_gotIconsArea = true; // now we have it!
- if ( iconArea() == wr ) return; // nothing changed; avoid repaint/saveIconPosition ...
+ if (( iconArea() == wr ) && (m_needDesktopAlign == false)) return; // nothing changed; avoid repaint/saveIconPosition ...
+
+ m_needDesktopAlign = false;
+ lineupIcons();
TQRect oldArea = iconArea();
setIconArea( wr );
diff --git a/kdesktop/kdiconview.h b/kdesktop/kdiconview.h
index 5ef349322..73b493120 100644
--- a/kdesktop/kdiconview.h
+++ b/kdesktop/kdiconview.h
@@ -258,6 +258,8 @@ private:
// did we already get the correct desktopIconsArea (from kicker)
// needed when we want to line up icons on a grid
bool m_gotIconsArea;
+
+ bool m_needDesktopAlign;
};
#endif