From 89285ea7776c4bb2af32ffc022af8393c693eb43 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Jun 27 2022 16:21:28 +0000 Subject: WIP - bugfix treeview selection with loaded DB --- diff --git a/hclient/gtkclient.py b/hclient/gtkclient.py index 68e7923..369b624 100644 --- a/hclient/gtkclient.py +++ b/hclient/gtkclient.py @@ -176,11 +176,10 @@ class hclient(object): def changeType(self,widget): """Change the type of a device.""" if not self.isKnownDevice(): - Type = self.getActive(self.typeCombo) - if self.currentDevice.type.type_name == Type: - return - self.client.changeType(self.currentDeviceCode,Type) - self.setDeviceTree() + type_name = self.getActive(self.typeCombo) + if not self.currentDevice.type.type_name == type_name: + self.client.changeType(self.currentDeviceCode , type_name) + self.setDeviceTree() def setTypeEntry(self):