def OnOK(self, event):
selected = self.LocationsTree.GetSelection()
var_infos = None
if selected.IsOk():
var_infos = self.LocationsTree.GetPyData(selected)
if var_infos is None or var_infos["type"] in [LOCATION_CONFNODE, LOCATION_MODULE, LOCATION_GROUP]:
dialog = wx.MessageDialog(self, _("A location must be selected!"), _("Error"), wx.OK | wx.ICON_ERROR)
dialog.ShowModal()
dialog.Destroy()
else:
self.EndModal(wx.ID_OK)
评论列表
文章目录