Commit d1ba54b5 authored by Olivier Teulière's avatar Olivier Teulière

* skins2/controls/ctrl_tree.cpp: backport of [15250] and [15251]

parent 524b6573
...@@ -771,7 +771,7 @@ void CtrlTree::makeImage() ...@@ -771,7 +771,7 @@ void CtrlTree::makeImage()
{ {
it = m_flat ? m_rTree.getNextLeaf( it ) it = m_flat ? m_rTree.getNextLeaf( it )
: m_rTree.getNextVisibleItem( it ); : m_rTree.getNextVisibleItem( it );
} while( it->m_deleted ); } while( it != m_rTree.end() && it->m_deleted );
} }
} }
} }
...@@ -792,7 +792,7 @@ void CtrlTree::makeImage() ...@@ -792,7 +792,7 @@ void CtrlTree::makeImage()
{ {
it = m_flat ? m_rTree.getNextLeaf( it ) it = m_flat ? m_rTree.getNextLeaf( it )
: m_rTree.getNextVisibleItem( it ); : m_rTree.getNextVisibleItem( it );
} while( it->m_deleted ); } while( it != m_rTree.end() && it->m_deleted );
} }
else else
{ {
...@@ -856,10 +856,11 @@ void CtrlTree::makeImage() ...@@ -856,10 +856,11 @@ void CtrlTree::makeImage()
yPos += (pText->getHeight() - ySrc ); yPos += (pText->getHeight() - ySrc );
delete pText; delete pText;
} }
do { do
it = m_flat ? m_rTree.getNextLeaf( it ) {
: m_rTree.getNextVisibleItem( it ); it = m_flat ? m_rTree.getNextLeaf( it )
} while( it->m_deleted ); : m_rTree.getNextVisibleItem( it );
} while( it != m_rTree.end() && it->m_deleted );
} }
stats_TimerStop( getIntf(), STATS_TIMER_SKINS_PLAYTREE_IMAGE ); stats_TimerStop( getIntf(), STATS_TIMER_SKINS_PLAYTREE_IMAGE );
} }
......
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