diff options
-rw-r--r-- | include/vcl/toolkit/ivctrl.hxx | 8 | ||||
-rw-r--r-- | vcl/source/control/imivctl1.cxx | 21 |
2 files changed, 6 insertions, 23 deletions
diff --git a/include/vcl/toolkit/ivctrl.hxx b/include/vcl/toolkit/ivctrl.hxx index 8e5e9abf1a3c..1442904fa2f8 100644 --- a/include/vcl/toolkit/ivctrl.hxx +++ b/include/vcl/toolkit/ivctrl.hxx @@ -37,10 +37,9 @@ class SvxIconChoiceCtrl_Impl; enum class SvxIconViewFlags { NONE = 0x0000, - POS_LOCKED = 0x0001, - SELECTED = 0x0002, - FOCUSED = 0x0004, - POS_MOVED = 0x0008, // Moved by Drag and Drop, but not logged + SELECTED = 0x0001, + FOCUSED = 0x0002, + POS_MOVED = 0x0004, // Moved by Drag and Drop, but not logged }; namespace o3tl { @@ -122,7 +121,6 @@ public: SvxIconViewFlags GetFlags() const { return nFlags; } bool IsSelected() const { return bool(nFlags & SvxIconViewFlags::SELECTED); } bool IsFocused() const { return bool(nFlags & SvxIconViewFlags::FOCUSED); } - bool IsPosLocked() const { return bool(nFlags & SvxIconViewFlags::POS_LOCKED); } }; diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx index 23c7a877f3f8..c647939ca4d6 100644 --- a/vcl/source/control/imivctl1.cxx +++ b/vcl/source/control/imivctl1.cxx @@ -297,16 +297,7 @@ void SvxIconChoiceCtrl_Impl::ResetVirtSize() { SvxIconChoiceCtrlEntry* pCur = maEntries[ nCur ].get(); pCur->ClearFlags( SvxIconViewFlags::POS_MOVED ); - if( pCur->IsPosLocked() ) - { - // adapt (among others) VirtSize - if( !IsBoundingRectValid( pCur->aRect ) ) - FindBoundingRect( pCur ); - else - AdjustVirtSize( pCur->aRect ); - } - else - InvalidateBoundingRect( pCur->aRect ); + InvalidateBoundingRect(pCur->aRect); } if( !(nWinBits & (WB_NOVSCROLL | WB_NOHSCROLL)) ) @@ -370,7 +361,7 @@ void SvxIconChoiceCtrl_Impl::InitPredecessors() SvxIconChoiceCtrlEntry* pPrev = maEntries[ 0 ].get(); for( size_t nCur = 1; nCur <= nCount; nCur++ ) { - pPrev->ClearFlags( SvxIconViewFlags::POS_LOCKED | SvxIconViewFlags::POS_MOVED ); + pPrev->ClearFlags(SvxIconViewFlags::POS_MOVED); SvxIconChoiceCtrlEntry* pNext; if( nCur == nCount ) @@ -1447,12 +1438,6 @@ void SvxIconChoiceCtrl_Impl::RecalcAllBoundingRectsSmart() void SvxIconChoiceCtrl_Impl::FindBoundingRect( SvxIconChoiceCtrlEntry* pEntry ) { - DBG_ASSERT(!pEntry->IsPosLocked(),"Locked entry pos in FindBoundingRect"); - if( pEntry->IsPosLocked() && IsBoundingRectValid( pEntry->aRect) ) - { - AdjustVirtSize( pEntry->aRect ); - return; - } Size aSize( CalcBoundingSize() ); Point aPos(pGridMap->GetGridRect(pGridMap->GetUnoccupiedGrid()).TopLeft()); SetBoundingRect_Impl( pEntry, aPos, aSize ); @@ -2128,7 +2113,7 @@ void SvxIconChoiceCtrl_Impl::SetPositionMode( SvxIconChoiceCtrlPositionMode eMod for( size_t nCur = 0; nCur < nCount; nCur++ ) { SvxIconChoiceCtrlEntry* pEntry = maEntries[ nCur ].get(); - if( pEntry->GetFlags() & SvxIconViewFlags(SvxIconViewFlags::POS_LOCKED | SvxIconViewFlags::POS_MOVED)) + if (pEntry->GetFlags() & SvxIconViewFlags::POS_MOVED) SetEntryPos(pEntry, GetEntryBoundRect( pEntry ).TopLeft()); } |