diff --git a/src/Mod/CAM/Path/Tool/assets/ui/filedialog.py b/src/Mod/CAM/Path/Tool/assets/ui/filedialog.py index 9717963fc1..b2a40963ff 100644 --- a/src/Mod/CAM/Path/Tool/assets/ui/filedialog.py +++ b/src/Mod/CAM/Path/Tool/assets/ui/filedialog.py @@ -126,13 +126,12 @@ class AssetOpenDialog(QFileDialog): # Import the external toolbits into local store self._import_external_toolbits(external_toolbits) # After importing, use regular deserialization since toolbits are now in local store - use_context_deserialize = False else: # User declined import, use context-aware deserialization for external loading - use_context_deserialize = True + pass else: # No external toolbits found, use regular deserialization - use_context_deserialize = False + pass except Exception as e: QMessageBox.critical(self, "Error", f"{file_path}: Failed to check dependencies: {e}") return None @@ -211,7 +210,6 @@ class AssetOpenDialog(QFileDialog): toolbit.id = dependency_uri.asset_id # Import the toolbit into local store - imported_uri = self.asset_manager.add(toolbit, store="local") imported_count += 1 except Exception as e: diff --git a/src/Mod/CAM/Path/Tool/assets/ui/preferences.py b/src/Mod/CAM/Path/Tool/assets/ui/preferences.py index 2e322c6004..dac0b8c8df 100644 --- a/src/Mod/CAM/Path/Tool/assets/ui/preferences.py +++ b/src/Mod/CAM/Path/Tool/assets/ui/preferences.py @@ -58,7 +58,7 @@ class AssetPreferencesPage: translate( "CAM_PreferencesAssets", "Note: Select the directory that will contain the " - "Bit/, Shape/, and Library/ subfolders.", + "Tool folder with Bit/, Shape/, and Library/ subfolders.", ) ) self.asset_path_note_label.setWordWrap(True) diff --git a/src/Mod/CAM/Path/Tool/camassets.py b/src/Mod/CAM/Path/Tool/camassets.py index a6695e2261..c3ee5c88ba 100644 --- a/src/Mod/CAM/Path/Tool/camassets.py +++ b/src/Mod/CAM/Path/Tool/camassets.py @@ -27,7 +27,7 @@ from Path import Preferences from Path.Preferences import addToolPreferenceObserver from .assets import AssetManager, AssetUri, Asset, FileStore -if True: +if False: Path.Log.setLevel(Path.Log.Level.DEBUG, Path.Log.thisModule()) Path.Log.trackModule(Path.Log.thisModule()) else: diff --git a/src/Mod/CAM/Path/Tool/migration/migration.py b/src/Mod/CAM/Path/Tool/migration/migration.py index c7352ef8e0..2dc9ecbf28 100644 --- a/src/Mod/CAM/Path/Tool/migration/migration.py +++ b/src/Mod/CAM/Path/Tool/migration/migration.py @@ -33,7 +33,7 @@ import Path.Preferences import pathlib # Logging setup - same pattern as Job.py -if True: +if False: Path.Log.setLevel(Path.Log.Level.DEBUG, Path.Log.thisModule()) Path.Log.trackModule(Path.Log.thisModule()) else: @@ -41,8 +41,8 @@ else: if FreeCAD.GuiUp: import FreeCADGui - from PySide.QtWidgets import QMessageBox - + from PySide.QtWidgets import QApplication, QMessageBox + from PySide.QtCore import Qt class CAMAssetMigrator: """ @@ -57,13 +57,8 @@ class CAMAssetMigrator: def __init__(self): self.pref_group_path = "User parameter:BaseApp/Preferences/Mod/CAM/Migration" - def check_migration_needed(self): - """ - Public method to check and handle CAM asset migration. - """ - self._check_migration_needed() - def _check_migration_needed(self): + def check_migration_needed(self): """ Check if CAM asset migration is needed for version upgrade.