Add missing clear of children memory in outline node
This commit is contained in:
parent
7c44dbd9d6
commit
8f52821cd4
|
@ -840,9 +840,9 @@ void PDF_PLOTTER::ClosePage()
|
|||
VECTOR2I bottomLeft = iuToPdfUserSpace( box.GetPosition() );
|
||||
VECTOR2I topRight = iuToPdfUserSpace( box.GetEnd() );
|
||||
|
||||
int curr_actionHandle = emitGoToAction( pageHandle, bottomLeft, topRight );
|
||||
actionHandle = emitGoToAction( pageHandle, bottomLeft, topRight );
|
||||
|
||||
addOutlineNode( groupOutlineNode, curr_actionHandle, ref );
|
||||
addOutlineNode( groupOutlineNode, actionHandle, ref );
|
||||
}
|
||||
|
||||
std::sort( groupOutlineNode->children.begin(), groupOutlineNode->children.end(),
|
||||
|
|
|
@ -367,11 +367,20 @@ public:
|
|||
protected:
|
||||
struct OUTLINE_NODE
|
||||
{
|
||||
int actionHandle; //< Handle to action
|
||||
wxString title; //< Title of outline node
|
||||
int entryHandle; //< Allocated handle for this outline entry
|
||||
int actionHandle; ///< Handle to action
|
||||
wxString title; ///< Title of outline node
|
||||
int entryHandle; ///< Allocated handle for this outline entry
|
||||
|
||||
std::vector<OUTLINE_NODE*> children;
|
||||
std::vector<OUTLINE_NODE*> children; ///< Ordered list of children
|
||||
|
||||
~OUTLINE_NODE()
|
||||
{
|
||||
std::for_each( children.begin(), children.end(),
|
||||
[]( OUTLINE_NODE* node )
|
||||
{
|
||||
delete node;
|
||||
} );
|
||||
}
|
||||
|
||||
OUTLINE_NODE* AddChild( int aActionHandle, const wxString& aTitle, int aEntryHandle )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue