diff --git a/python/FIERRO-GUI/fierro_gui/FIERRO_GUI.ui b/python/FIERRO-GUI/fierro_gui/FIERRO_GUI.ui
index 947184457..44084154e 100644
--- a/python/FIERRO-GUI/fierro_gui/FIERRO_GUI.ui
+++ b/python/FIERRO-GUI/fierro_gui/FIERRO_GUI.ui
@@ -12157,8 +12157,11 @@ li.checked::marker { content: "\2612"; }
File
+
+
+
@@ -12176,7 +12179,7 @@ li.checked::marker { content: "\2612"; }
- Save as..
+ Save as...
@@ -12189,6 +12192,11 @@ li.checked::marker { content: "\2612"; }
Open
+
+
+ New...
+
+
INSphereri
diff --git a/python/FIERRO-GUI/fierro_gui/gui.py b/python/FIERRO-GUI/fierro_gui/gui.py
index 74803935f..21c4e95ad 100644
--- a/python/FIERRO-GUI/fierro_gui/gui.py
+++ b/python/FIERRO-GUI/fierro_gui/gui.py
@@ -3,10 +3,11 @@
import time
from PySide6.QtWidgets import QApplication
from PySide6.QtGui import QPalette, QColor
-from PySide6.QtCore import Qt
+from PySide6.QtCore import Qt, QTimer
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
def main():
- t1 = time.perf_counter()
+# t1 = time.perf_counter()
sys.path.append(os.path.dirname(__file__))
from fierro_gui.FIERRO_GUI import FIERRO_GUI
from PySide6.QtWidgets import QMainWindow, QApplication, QSplashScreen
@@ -16,6 +17,14 @@ def main():
# MAIN WINDOW CLASS
class MainWindow(QMainWindow):
+ def restart(self):
+ QApplication.quit()
+ python = sys.executable
+ os.execl(python, python, *sys.argv)
+
+ def setup_restart(self):
+ self.ui.actionNew.triggered.connect(self.restart)
+
def __init__(self):
super(MainWindow, self).__init__()
self.setWindowTitle("Fierro")
@@ -23,12 +32,15 @@ def __init__(self):
self.ui.setupUi(self)
self.setEnabled(False)
+ # add restart
+ self.setup_restart()
+
# SHOW MAIN WINDOW
self.show()
# SHOW FIERRO SETUP WINDOW
- t2 = time.perf_counter()
- print(f"Started up in {t2 - t1:0.4f} seconds")
+# t2 = time.perf_counter()
+# print(f"Started up in {t2 - t1:0.4f} seconds")
self.ui.open_fierro_setup_dialog(self)
# self.dialog = WorkingDirectoryDialog(self)
@@ -39,7 +51,7 @@ def __init__(self):
app.setStyle('Fusion')
app.setWindowIcon(QIcon(':/Logos/Logos/FierroAppIcon.png'))
app.setApplicationDisplayName("Fierro")
- start = time.perf_counter()
+# start = time.perf_counter()
# print ("Splash Screen")
# pixmap = QPixmap(":/Logos/Logos/FIERRO.png")
# pixmap = pixmap.scaledToWidth(500)
@@ -55,7 +67,6 @@ def __init__(self):
window.show()
# splash.finish(window)
-
sys.exit(app.exec())
def force_light_mode(app):
diff --git a/python/FIERRO-GUI/fierro_gui/ui_FIERRO_GUI.py b/python/FIERRO-GUI/fierro_gui/ui_FIERRO_GUI.py
index f35fe3082..b1b793ae5 100644
--- a/python/FIERRO-GUI/fierro_gui/ui_FIERRO_GUI.py
+++ b/python/FIERRO-GUI/fierro_gui/ui_FIERRO_GUI.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
################################################################################
-## Form generated from reading UI file 'FIERRO_GUIfiuqEK.ui'
+## Form generated from reading UI file 'FIERRO_GUIYaKUPn.ui'
##
## Created by: Qt User Interface Compiler version 6.6.0
##
@@ -58,6 +58,8 @@ def setupUi(self, MainWindow):
self.actionHelp.setObjectName(u"actionHelp")
self.actionOpen = QAction(MainWindow)
self.actionOpen.setObjectName(u"actionOpen")
+ self.actionNew = QAction(MainWindow)
+ self.actionNew.setObjectName(u"actionNew")
self.centralwidget = QWidget(MainWindow)
self.centralwidget.setObjectName(u"centralwidget")
self.centralwidget.setEnabled(True)
@@ -6384,8 +6386,11 @@ def setupUi(self, MainWindow):
self.menubar.addAction(self.menuFile.menuAction())
self.menubar.addAction(self.menuHelp.menuAction())
self.menuHelp.addAction(self.actionManual)
+ self.menuFile.addAction(self.actionNew)
self.menuFile.addAction(self.actionOpen)
+ self.menuFile.addSeparator()
self.menuFile.addAction(self.actionSaveAs)
+ self.menuFile.addSeparator()
self.menuFile.addAction(self.actionChange_Working_Directory)
self.retranslateUi(MainWindow)
@@ -6440,9 +6445,10 @@ def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"Fierro", None))
self.actionManual.setText(QCoreApplication.translate("MainWindow", u"Manual", None))
self.actionChange_Working_Directory.setText(QCoreApplication.translate("MainWindow", u"Change Working Directory", None))
- self.actionSaveAs.setText(QCoreApplication.translate("MainWindow", u"Save as..", None))
+ self.actionSaveAs.setText(QCoreApplication.translate("MainWindow", u"Save as...", None))
self.actionHelp.setText(QCoreApplication.translate("MainWindow", u"Help", None))
self.actionOpen.setText(QCoreApplication.translate("MainWindow", u"Open", None))
+ self.actionNew.setText(QCoreApplication.translate("MainWindow", u"New...", None))
self.NavigationMenu.setTabText(self.NavigationMenu.indexOf(self.Title), "")
self.NavigationMenu.setTabText(self.NavigationMenu.indexOf(self.Pipeline), QCoreApplication.translate("MainWindow", u"Pipeline", None))
self.NavigationMenu.setTabText(self.NavigationMenu.indexOf(self.Geometry), QCoreApplication.translate("MainWindow", u"Geometry", None))