diff --git a/wacom-gui/wacom-gui.py b/wacom-gui/wacom-gui.py index 4556c04..09ec8c5 100644 --- a/wacom-gui/wacom-gui.py +++ b/wacom-gui/wacom-gui.py @@ -226,6 +226,8 @@ def getConfigs(self, idx): self.tablet_data.tablets[dev][dev_id]['conf_path'] = os.path.join(home, dev) if dev not in self.configs.keys(): self.configs[dev] = {} + if not os.path.exists(conf_path): + os.mkdir(self.tablet_data.tablets[dev][dev_id]['conf_path']) if os.path.exists(conf_path): # get configs in path for config in os.listdir(conf_path): @@ -267,9 +269,7 @@ def getConfigs(self, idx): self.configButtons.btn_grp.buttons()[idx].setChecked(True) self.tablet_data.tablets[dev][dev_id]['config'] = self.config else: - os.mkdir(self.tablet_data.tablets[dev][dev_id]['conf_path']) - self.configLayout.addButton( - self.configButtons.addButton("default", 0, 0, 0, os.path.join(self.cwd, 'icons/ui/config.png'), 48)) + pass def loadConfig(self, dev, dev_id, config): # TODO: load cursor configs @@ -366,6 +366,9 @@ def boxdelete(self, box): break def updateConfigs(self): + # if there is no config don't try to update the configs + if (self.config == None): + return write = False if not self.toolButtons.buttons[(0, 0)].isHidden(): pad = self.pad.get_config()