alejandroautalan/pygubu — pull request #42 by majensen (2014-12-19 05:11:35+00:00)
Title: Fix issue that causes file layouts to get mangled

I noticed the following issue. Suppose you create a layout, and then manually change the row values of items in column 0 using the menus. When you save the XML, the row values of the children are no longer in sequential order. When you reload this XML into designer, column 0 items can be moved from the original rows you set, with extra empty cells in rows above the items.
From this:
![good-ui-load-pygubu](https://cloud.githubusercontent.com/assets/82073/5500476/1f8fce02-8713-11e4-961c-7efef48872ba.png)

To this:
![bad-ui-load-pygubu](https://cloud.githubusercontent.com/assets/82073/5500484/35af9992-8713-11e4-96f3-a674f305ac6d.png)

The reason appears to be that as items are added, code in _insert_item makes new rows to accomodate new items. This works as long you are creating new items in the UI, but is not necessary when you are loading a pre-defined layout. The pull request is a minimal fix to this issue (I think).

----
Added a "from_file" flag to populate_tree and _insert_item that
short-circuits the code that inserts new rows when a layout is
being loaded from xml.

From load_file, called populate_tree with from_file=True