filebrowser fix
This commit is contained in:
1 parent
62427dbdb4
commit
333e16ef4f
2 files changed
+3
-6
No files matched your search
+3
-3
@@ -365,15 +365,15 @@ class KaTrainGui(Screen, KaTrainBase):
|
||||
).__self__
|
||||
|
||||
def readfile(*_args):
|
||||
files = popup_contents.filesel.selection
|
||||
filename = popup_contents.filesel.filename
|
||||
self.fileselect_popup.dismiss()
|
||||
path, file = os.path.split(files[0])
|
||||
path, file = os.path.split(filename)
|
||||
settings_path = self.config("general/sgf_load")
|
||||
if path != settings_path:
|
||||
self.log(f"Updating sgf load path default to {path}", OUTPUT_INFO)
|
||||
self._config["general"]["sgf_load"] = path
|
||||
self.save_config("general")
|
||||
self.load_sgf_file(files[0], popup_contents.fast.active, popup_contents.rewind.active)
|
||||
self.load_sgf_file(filename, popup_contents.fast.active, popup_contents.rewind.active)
|
||||
|
||||
popup_contents.filesel.on_success = readfile
|
||||
popup_contents.filesel.on_submit = readfile
|
||||
|
||||
@@ -165,9 +165,6 @@ Builder.load_string(
|
||||
#:import abspath os.path.abspath
|
||||
#:import i18n katrain.core.lang.i18n
|
||||
|
||||
<Button>:
|
||||
track_lang: i18n._('')
|
||||
|
||||
<TreeLabel>:
|
||||
on_touch_down:
|
||||
self.parent.browser.path = self.path if self.collide_point(*args[1].pos) and self.path else self.parent.browser.path
|
||||
|
||||
Reference in new issue
Block a user