Skip to content

Commit

Permalink
PICARD-2791: Reset options dialog splitter config on upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
phw committed Dec 16, 2023
1 parent 983de26 commit 41a8381
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion picard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
PICARD_DISPLAY_NAME = "MusicBrainz Picard"
PICARD_APP_ID = "org.musicbrainz.Picard"
PICARD_DESKTOP_NAME = PICARD_APP_ID + ".desktop"
PICARD_VERSION = Version(3, 0, 0, 'dev', 1)
PICARD_VERSION = Version(3, 0, 0, 'dev', 2)


# optional build version
Expand Down
6 changes: 6 additions & 0 deletions picard/config_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,11 @@ def upgrade_to_v3_0_0_dev_1(config):
config.remove(key)


def upgrade_to_v3_0_0_dev_2(config):
"""Reset option dialog splitter states"""
config.persist['splitters_OptionsDialog'] = b''


def rename_option(config, old_opt, new_opt, option_type, default):
_s = config.setting
if old_opt in _s:
Expand Down Expand Up @@ -552,4 +557,5 @@ def upgrade_config(config):
cfg.register_upgrade_hook(upgrade_to_v2_8_0_dev_2)
cfg.register_upgrade_hook(upgrade_to_v2_9_0_alpha_2)
cfg.register_upgrade_hook(upgrade_to_v3_0_0_dev_1)
cfg.register_upgrade_hook(upgrade_to_v3_0_0_dev_2)
cfg.run_upgrade_hooks(log.debug)

0 comments on commit 41a8381

Please sign in to comment.