From e8123b72744b81302f1d264082940b58b3695584 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Mon, 18 Nov 2024 11:12:58 +0100 Subject: Thread catalog: fix broken path (#3281) * thread catalog: fix broken path * apply threadlist: use wxpython to also include custom lists * apply_palette: save last choice --- lib/threads/catalog.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'lib/threads') diff --git a/lib/threads/catalog.py b/lib/threads/catalog.py index 46eb90ad..886d9aa4 100644 --- a/lib/threads/catalog.py +++ b/lib/threads/catalog.py @@ -4,12 +4,10 @@ # Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details. import os -import sys from collections.abc import Sequence from glob import glob -from os.path import dirname, realpath -from ..utils import guess_inkscape_config_path +from ..utils import get_bundled_dir, guess_inkscape_config_path from .palette import ThreadPalette @@ -26,13 +24,8 @@ class _ThreadCatalog(Sequence): 2. Palette directory of inkstitch """ path = [os.path.join(guess_inkscape_config_path(), 'palettes')] - - if getattr(sys, 'frozen', None) is not None: - inkstitch_path = os.path.join(sys._MEIPASS, "..") - else: - inkstitch_path = dirname(dirname(dirname(realpath(__file__)))) - - path.append(os.path.join(inkstitch_path, 'palettes')) + inkstitch_path = get_bundled_dir('palettes') + path.append(inkstitch_path) return path -- cgit v1.2.3