testing changes
This commit is contained in:
@@ -63,6 +63,7 @@ right = 0
|
||||
|
||||
[Options]
|
||||
show_welcome_dialog = true
|
||||
first_startup = true
|
||||
|
||||
[Preferences]
|
||||
2d_data_bypass = false
|
||||
@@ -539,8 +540,20 @@ class MainApplication(QMainWindow):
|
||||
|
||||
# Check if we should pop up the welcome screen
|
||||
should_show_welcome = file_cfg.getboolean("Options", "show_welcome_dialog", fallback=True)
|
||||
first_startup = file_cfg.getboolean("Options", "first_startup", fallback=False)
|
||||
|
||||
if should_show_welcome:
|
||||
if first_startup:
|
||||
file_cfg.set("Options", "first_startup", "false")
|
||||
try:
|
||||
with open(cfg_path, "w") as f:
|
||||
file_cfg.write(f)
|
||||
except Exception as e:
|
||||
print(f"Warning: Could not save preference: {e}")
|
||||
|
||||
welcome = WelcomeDialog(self, direct=True, first=first_startup)
|
||||
welcome.show()
|
||||
|
||||
elif should_show_welcome:
|
||||
file_cfg.set("Options", "show_welcome_dialog", "false")
|
||||
try:
|
||||
with open(cfg_path, "w") as f:
|
||||
@@ -548,9 +561,11 @@ class MainApplication(QMainWindow):
|
||||
except Exception as e:
|
||||
print(f"Warning: Could not save preference: {e}")
|
||||
|
||||
welcome = WelcomeDialog(self, direct=True)
|
||||
welcome = WelcomeDialog(self, direct=True, first=False)
|
||||
welcome.show()
|
||||
|
||||
|
||||
|
||||
|
||||
def init_ui(self):
|
||||
central = QWidget()
|
||||
@@ -1150,7 +1165,6 @@ class MainApplication(QMainWindow):
|
||||
self.analysis_clearing_bypass = file_cfg.getboolean("Preferences", "analysis_clearing_bypass", fallback=False)
|
||||
self.folding_bypass = file_cfg.getboolean("Preferences", "folding_bypass", fallback=False)
|
||||
|
||||
self.show_welcome_dialog = file_cfg.getboolean("Options", "show_welcome_dialog", fallback=True)
|
||||
|
||||
# 2. Sync the UI Menu checkmarks visually
|
||||
if hasattr(self, 'pref_actions'):
|
||||
@@ -2535,7 +2549,7 @@ def config_init():
|
||||
has_changes = True
|
||||
continue
|
||||
|
||||
for option in file_cfg.options(section):
|
||||
for option in list(file_cfg.options(section)):
|
||||
if not ref_cfg.has_option(section, option):
|
||||
file_cfg.remove_option(section, option)
|
||||
has_changes = True
|
||||
@@ -2545,7 +2559,7 @@ def config_init():
|
||||
file_cfg.add_section(section)
|
||||
has_changes = True
|
||||
|
||||
for option in ref_cfg.options(section):
|
||||
for option in list(ref_cfg.options(section)):
|
||||
if not file_cfg.has_option(section, option):
|
||||
default_val = ref_cfg.get(section, option)
|
||||
file_cfg.set(section, option, default_val)
|
||||
|
||||
Reference in New Issue
Block a user