diff options
Diffstat (limited to 'kdesktop')
-rw-r--r-- | kdesktop/kdiconview.cc | 8 | ||||
-rw-r--r-- | kdesktop/kdiconview.h | 2 |
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 |