tdf#130196 sd_navigator: show correct icon when dnd nav-ordering
For x11 a no drop icon was shown for single page documents when nav- ordering objects by dnd in the Navigator objects tree. Change-Id: If84b34a764527db57d9645ec7d23c8b1d4c10942 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192657 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
This commit is contained in:
@@ -902,10 +902,17 @@ void SdPageObjsTLV::Select()
|
||||
|
||||
if( eDragType == NAVIGATOR_DRAGTYPE_LINK )
|
||||
nDNDActions = DND_ACTION_LINK; // Either COPY *or* LINK, never both!
|
||||
else if (m_pDoc->GetSdPageCount(PageKind::Standard) == 1)
|
||||
else
|
||||
{
|
||||
// Can not move away the last slide in a document.
|
||||
nDNDActions = DND_ACTION_COPY;
|
||||
// Only for page/slide entry and only if page/slide entry dragging is re-enabled.
|
||||
// Commit 1b031eb1ba6c529ce67ff8f471afee414d64a098 disabled page/slide entry dragging.
|
||||
std::unique_ptr<weld::TreeIter> xIter(m_xTreeView->make_iterator());
|
||||
if (m_xTreeView->get_cursor(xIter.get()) && m_xTreeView->get_iter_depth(*xIter) == 0
|
||||
&& m_pDoc->GetSdPageCount(PageKind::Standard) == 1)
|
||||
{
|
||||
// Can not move away the last slide in a document.
|
||||
nDNDActions = DND_ACTION_COPY;
|
||||
}
|
||||
}
|
||||
|
||||
// object is destroyed by internal reference mechanism
|
||||
|
||||
Reference in New Issue
Block a user