Skip to content

Commit bfe4e4f

Browse files
committed
objectdialog: minor renaming
1 parent 54303fc commit bfe4e4f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

cdlclient/widgets/objectdialog.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ def __str__(self) -> str:
6060
textlist.append(" " + tl_item.child(index).text(0))
6161
return os.linesep.join(textlist)
6262

63-
def init_from(self, proxy: SimpleRemoteProxy) -> None:
64-
"""Init from another SimpleObjectList, without making copies of objects"""
63+
def initialize(self, proxy: SimpleRemoteProxy) -> None:
64+
"""Initialize tree with objects, using proxy"""
6565
grp_titles, obj_uuids, obj_titles = proxy.get_group_titles_with_object_infos()
6666
self.__grp_titles = grp_titles
6767
self.__obj_uuids = obj_uuids
@@ -214,7 +214,7 @@ def __init__(
214214
self.__proxy.set_current_panel(panel)
215215

216216
self.tree = SimpleObjectTree(parent)
217-
self.tree.init_from(proxy)
217+
self.tree.initialize(proxy)
218218
self.tree.SIG_ITEM_DOUBLECLICKED.connect(lambda oid: self.accept())
219219
self.tree.itemSelectionChanged.connect(self.__current_object_changed)
220220

@@ -236,15 +236,13 @@ def __init__(
236236
def __change_panel(self, index: int) -> None:
237237
"""Change panel"""
238238
self.__proxy.set_current_panel("signal" if index == 0 else "image")
239-
self.tree.init_from(self.__proxy)
239+
self.tree.initialize(self.__proxy)
240240
self.__current_object_changed()
241241

242242
def __current_object_changed(self) -> None:
243243
"""Item selection has changed"""
244244
self.__current_object_uuid = self.tree.get_current_item_id()
245245
self.ok_btn.setEnabled(bool(self.__current_object_uuid))
246-
self.ok_btn.setEnabled(bool(self.__current_object_uuid))
247-
self.ok_btn.setEnabled(bool(self.__current_object_uuid))
248246

249247
def get_current_object_uuid(self) -> str:
250248
"""Return current object uuid"""

0 commit comments

Comments
 (0)