Make the adjust and "open output path" actions consistent

This commit is contained in:
randall.rupper
2021-03-05 08:58:38 -07:00
parent 91c0114d32
commit b108398545
2 changed files with 11 additions and 4 deletions

View File

@@ -7,6 +7,8 @@ import json
import logging import logging
import os import os
from Utils import output_path
def adjust_page(top, parent, settings): def adjust_page(top, parent, settings):
# Adjust page # Adjust page
self = ttk.Frame(parent) self = ttk.Frame(parent)
@@ -90,6 +92,8 @@ def adjust_page(top, parent, settings):
# These are the options to Adjust # These are the options to Adjust
def adjustRom(): def adjustRom():
if output_path.cached_path is None:
output_path.cached_path = top.settings["outputpath"]
options = { options = {
"heartbeep": "heartbeep", "heartbeep": "heartbeep",
"heartcolor": "heartcolor", "heartcolor": "heartcolor",

View File

@@ -146,10 +146,13 @@ def bottom_frame(self, parent, args=None):
self.widgets[widget].pieces["button"].pack(side=LEFT) self.widgets[widget].pieces["button"].pack(side=LEFT)
def open_output(): def open_output():
if args and args.outputpath: if output_path.cached_path is None:
open_file(output_path(args.outputpath)) if args and args.outputpath:
else: output_path.cached_path = args.outputpath
open_file(output_path(parent.settings["outputpath"])) else:
output_path.cached_path = parent.settings["outputpath"]
open_file(output_path('.'))
## Output Button ## Output Button
# widget ID # widget ID