Skip to content

Commit

Permalink
Checkbox to skip startup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
imirzov committed Aug 1, 2021
1 parent b8fe677 commit 2211f3a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
23 changes: 23 additions & 0 deletions config/SettingsDialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,29 @@
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="perform_startup_checks">
<property name="text">
<string>Perform startup checks</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
Expand Down
10 changes: 6 additions & 4 deletions src/cae.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@
import logging
logging.basicConfig(level=logging.NOTSET)

from settings import s

# Run some important checks before start
import checks
checks.run_startup_checks()
clean.screen()
if s.perform_startup_checks:
import checks
checks.run_startup_checks()
clean.screen()

import os
from PyQt5 import QtWidgets, QtWebEngineWidgets
Expand All @@ -52,7 +55,6 @@
Could be chosen with command line parameter.
"""
import argparse
from settings import s
parser = argparse.ArgumentParser()
parser.add_argument('-inp', type=str,
help='your .inp file',
Expand Down
3 changes: 1 addition & 2 deletions src/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
Application settings.
Attributes values are maintained in config/Settings_*.py.
User dialog form is config/SettingsDialog.xml - use Qt Designer to edit.
# TODO Checkbox to skip startup tests.
"""

# Standard modules
Expand Down Expand Up @@ -55,6 +53,7 @@ def __init__(self):
self.start_cgx_by_default = True
self.align_windows = True
self.show_help = False
self.perform_startup_checks = True

def open(self):
"""Open dialog window and pass settings."""
Expand Down

0 comments on commit 2211f3a

Please sign in to comment.