7911: Fix bug adding parent places to a new place
This commit is contained in:
parent
c4bcf66e29
commit
9d419f3f5c
@ -175,8 +175,7 @@ class PlaceTreeView(PlaceBaseView):
|
|||||||
|
|
||||||
def add(self, obj):
|
def add(self, obj):
|
||||||
"""
|
"""
|
||||||
Add a new place. Attempt to get the top three levels of hierarchy from
|
Add a new place. Use the currently selected rows as parent places.
|
||||||
the currently selected row.
|
|
||||||
"""
|
"""
|
||||||
parent_list = []
|
parent_list = []
|
||||||
for handle in self.selected_handles():
|
for handle in self.selected_handles():
|
||||||
@ -186,7 +185,7 @@ class PlaceTreeView(PlaceBaseView):
|
|||||||
|
|
||||||
place = Place()
|
place = Place()
|
||||||
if len(parent_list) > 0:
|
if len(parent_list) > 0:
|
||||||
place.parent = parent_list
|
place.placeref_list = parent_list
|
||||||
|
|
||||||
try:
|
try:
|
||||||
EditPlace(self.dbstate, self.uistate, [], place)
|
EditPlace(self.dbstate, self.uistate, [], place)
|
||||||
|
Loading…
Reference in New Issue
Block a user