mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-19 07:28:43 +00:00
Merge with develop
--HG-- branch : compatibility-develop
This commit is contained in:
commit
ecc7cac376
2 changed files with 19 additions and 1 deletions
|
@ -97,6 +97,7 @@ namespace NLGUI
|
|||
void addChildSortedByBitmap(SNode *pNode);
|
||||
void setParentTree(CGroupTree *parent);
|
||||
void setFather(SNode *father);
|
||||
void openAll();
|
||||
void closeAll();
|
||||
void makeOrphan();
|
||||
bool parse (xmlNodePtr cur, CGroupTree *parentGroup);
|
||||
|
|
|
@ -271,6 +271,14 @@ namespace NLGUI
|
|||
pNode->setFather(this);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
void CGroupTree::SNode::openAll()
|
||||
{
|
||||
Opened = true;
|
||||
for (uint i = 0; i < Children.size(); ++i)
|
||||
Children[i]->openAll();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
void CGroupTree::SNode::closeAll()
|
||||
{
|
||||
|
@ -1082,7 +1090,9 @@ namespace NLGUI
|
|||
}
|
||||
}
|
||||
|
||||
if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown)
|
||||
bool toggleOne = (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown);
|
||||
bool toggleAll = (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouserightdown);
|
||||
if (toggleOne || toggleAll)
|
||||
{
|
||||
// line selection
|
||||
if (bText)
|
||||
|
@ -1118,6 +1128,13 @@ namespace NLGUI
|
|||
{
|
||||
// open/close the node
|
||||
changedNode->Opened = !changedNode->Opened;
|
||||
if (toggleAll)
|
||||
{
|
||||
if (changedNode->Opened)
|
||||
changedNode->openAll();
|
||||
else
|
||||
changedNode->closeAll();
|
||||
}
|
||||
}
|
||||
// else must close all necessary nodes.
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue