Skip to content

Commit

Permalink
Explore follows asset cursor.
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkusk committed Sep 30, 2023
1 parent 88d2de9 commit aae0daa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ttsmutility/screens/AssetListScreen.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def __init__(
self.current_row = 0
self.url_width = 40
self.al_id = al_id
self.explore = False

config = load_config()
self.mod_dir = config.tts_mods_dir
Expand Down Expand Up @@ -288,6 +289,11 @@ def trail_reformat(self, trail):
trail = trail.replace(x, y)
return trail

async def on_data_table_row_highlighted(self, event: DataTable.RowHighlighted):
if event.row_key.value is not None:
if self.explore:
self.app.call_after_refresh(self.action_explore)

def on_data_table_row_selected(self, event: DataTable.RowSelected):
if event.row_key.value is not None:
if self.all_nodes and "#" in event.row_key.value:
Expand Down Expand Up @@ -498,3 +504,4 @@ async def action_explore(self) -> None:
except NoMatches:
container = self.query_one(Container)
await container.mount(ModExplorer(mod_filepath, id="mod_explorer"))
self.explore = True

0 comments on commit aae0daa

Please sign in to comment.