Skip to content

Commit

Permalink
save url for next use
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramin authored and Ramin committed Feb 16, 2024
1 parent 1f760a2 commit f827dc8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions ross_ui/controller/mainWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ def __init__(self):
self.closeBottonPCAManual.clicked.connect(self.PCAManualCloseButton)
self.doneBottonPCAManual.clicked.connect(self.PCAManualDoneButton)


if os.path.isfile('./.tmp/url'):
with open('./.tmp/url', 'r') as f:
self.url = f.read()

def resetOnSignOutVars(self):

self.raw = None
Expand Down Expand Up @@ -447,6 +452,8 @@ def open_server_dialog(self):
dialog = server_form(server_text=self.url)
if dialog.exec_() == QtWidgets.QDialog.Accepted:
self.url = dialog.lineEdit.text()
with open('./.tmp/url', 'w') as f:
f.write(self.url)

def open_raw_dialog(self, variables):
dialog = raw_form(variables)
Expand Down
2 changes: 1 addition & 1 deletion ross_ui/model/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import requests


class API():
class API:
def __init__(self, url):
self.url = url
self.refresh_token = None
Expand Down

0 comments on commit f827dc8

Please sign in to comment.