Kaydet (Commit) 843ec02f authored tarafından Caolán McNamara's avatar Caolán McNamara

set m_bLinkableSelected before calling handler

Change-Id: I82bbd43e135490f97e2b7c78e48a01d573b0702a
Reviewed-on: https://gerrit.libreoffice.org/68295
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 81d29720
...@@ -1434,6 +1434,19 @@ SdPageObjsTLV::SdPageObjsTLV(std::unique_ptr<weld::TreeView> xTreeView) ...@@ -1434,6 +1434,19 @@ SdPageObjsTLV::SdPageObjsTLV(std::unique_ptr<weld::TreeView> xTreeView)
, m_bShowAllShapes(false) , m_bShowAllShapes(false)
{ {
m_xTreeView->connect_expanding(LINK(this, SdPageObjsTLV, RequestingChildrenHdl)); m_xTreeView->connect_expanding(LINK(this, SdPageObjsTLV, RequestingChildrenHdl));
m_xTreeView->connect_changed(LINK(this, SdPageObjsTLV, SelectHdl));
}
IMPL_LINK_NOARG(SdPageObjsTLV, SelectHdl, weld::TreeView&, void)
{
m_bLinkableSelected = true;
m_xTreeView->selected_foreach([this](weld::TreeIter& rEntry){
if (m_xTreeView->get_id(rEntry).toInt64() == 0)
m_bLinkableSelected = false;
});
m_aChangeHdl.Call(*m_xTreeView);
} }
OUString SdPageObjsTLV::GetObjectName( OUString SdPageObjsTLV::GetObjectName(
......
...@@ -310,6 +310,7 @@ private: ...@@ -310,6 +310,7 @@ private:
bool m_bShowAllShapes; bool m_bShowAllShapes;
OUString m_aDocName; OUString m_aDocName;
::sd::DrawDocShellRef m_xBookmarkDocShRef; ///< for the loading of bookmarks ::sd::DrawDocShellRef m_xBookmarkDocShRef; ///< for the loading of bookmarks
Link<weld::TreeView&, void> m_aChangeHdl;
/** Return the name of the object. When the object has no user supplied /** Return the name of the object. When the object has no user supplied
name and the bCreate flag is <TRUE/> then a name is created name and the bCreate flag is <TRUE/> then a name is created
...@@ -331,6 +332,7 @@ private: ...@@ -331,6 +332,7 @@ private:
void CloseBookmarkDoc(); void CloseBookmarkDoc();
DECL_LINK(RequestingChildrenHdl, weld::TreeIter&, bool); DECL_LINK(RequestingChildrenHdl, weld::TreeIter&, bool);
DECL_LINK(SelectHdl, weld::TreeView&, void);
public: public:
...@@ -364,7 +366,7 @@ public: ...@@ -364,7 +366,7 @@ public:
void connect_changed(const Link<weld::TreeView&, void>& rLink) void connect_changed(const Link<weld::TreeView&, void>& rLink)
{ {
m_xTreeView->connect_changed(rLink); m_aChangeHdl = rLink;
} }
bool is_selected(const weld::TreeIter& rIter) const bool is_selected(const weld::TreeIter& rIter) const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment