diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-08-04 11:16:17 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-08-04 16:59:05 +0200 |
commit | a1cb7ede7841de1cb38f260cecd5c067f0a8dac6 (patch) | |
tree | f83acaf6c5d33ed492aec834cb161312dbd819cd /cui | |
parent | 01b96fcefe5c8d9a7078b24b26134278b89f3f12 (diff) |
tdf#134420 select neighbour when deleted
Change-Id: I55c6135360d3d77b7b3d2e54012ad82e1a4813ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100086
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/tpbitmap.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 87f22835adc3..c679339199db 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -572,10 +572,14 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickDeleteHdl, SvxPresetListBox*, void) if (xQueryBox->run() == RET_YES) { + sal_uInt16 nNextId = m_xBitmapLB->GetItemId(nPos + 1); + if (!nNextId) + nNextId = m_xBitmapLB->GetItemId(nPos - 1); + m_pBitmapList->Remove( static_cast<sal_uInt16>(nPos) ); m_xBitmapLB->RemoveItem( nId ); - nId = m_xBitmapLB->GetItemId(0); - m_xBitmapLB->SelectItem( nId ); + + m_xBitmapLB->SelectItem(nNextId); m_aCtlBitmapPreview.Invalidate(); ModifyBitmapHdl(m_xBitmapLB.get()); |