Fix [ 1741277 ] Changing menu structure makes adempiere hang

This commit is contained in:
Carlos Ruiz 2007-06-22 13:07:12 +00:00
parent d7316ff342
commit cd7a34ac53
1 changed files with 6 additions and 2 deletions

View File

@ -231,7 +231,9 @@ public class MTree extends MTree_Base
if (parent != null && parent.getAllowsChildren())
{
parent.add(node);
int sizeBeforeCheckBuffer = m_buffer.size();
checkBuffer(node);
if (sizeBeforeCheckBuffer == m_buffer.size())
m_buffer.remove(i);
i = -1; // start again with i=0
}
@ -246,7 +248,9 @@ public class MTree extends MTree_Base
{
MTreeNode node = (MTreeNode)m_buffer.get(i);
m_root.add(node);
int sizeBeforeCheckBuffer = m_buffer.size();
checkBuffer(node);
if (sizeBeforeCheckBuffer == m_buffer.size())
m_buffer.remove(i);
i = -1;
}