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
v3.5.13-sru
tpearson 14 years ago
parent de908a3f4f
commit 5116f6efd1

@ -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 );

@ -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

Loading…
Cancel
Save