Resolves: tdf#106159 right click + left click with comments in navigator

results in a disposed submenu in the menu, we need to flag with bSubPop4
that we have inserted the submenu into the parent menu to not dispose
it

Change-Id: I5b9711c0bba750c11d64dc175efd452f4bc8f4e5
This commit is contained in:
Caolán McNamara 2017-02-23 17:15:04 +00:00
parent baee96e04a
commit 58659cbaa8

View file

@ -1243,6 +1243,7 @@ VclPtr<PopupMenu> SwContentTree::CreateContextMenu()
SwContentType* pType = static_cast<SwContentType*>(pEntry->GetUserData()); SwContentType* pType = static_cast<SwContentType*>(pEntry->GetUserData());
if ( (pType->GetType() == ContentTypeId::POSTIT) && (!m_pActiveShell->GetView().GetDocShell()->IsReadOnly()) && ( pType->GetMemberCount() > 0) ) if ( (pType->GetType() == ContentTypeId::POSTIT) && (!m_pActiveShell->GetView().GetDocShell()->IsReadOnly()) && ( pType->GetMemberCount() > 0) )
{ {
bSubPop4 = true;
pSubPop4->InsertItem(600, m_sPostItShow ); pSubPop4->InsertItem(600, m_sPostItShow );
pSubPop4->InsertItem(601, m_sPostItHide ); pSubPop4->InsertItem(601, m_sPostItHide );
pSubPop4->InsertItem(602, m_sPostItDelete ); pSubPop4->InsertItem(602, m_sPostItDelete );