Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix two 'first run' bugs #62

Merged
merged 2 commits into from
Feb 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions wacom-gui/wacom-gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down