fix: Insert Component uses Silo browser when available (#202) #222

Merged
forbes merged 1 commits from fix/insert-component-silo into main 2026-02-14 21:04:53 +00:00
Owner

Problem

When Silo is the active origin, Insert Component opens the OS native file dialog instead of a Silo part browser.

Fix

Modified openFiles() in CommandInsertLink.py to:

  1. Try importing the Silo OpenItemWidget — if silo-mod is loaded, show the Silo part browser (search database + local files) instead of the OS dialog
  2. Fall back to OS file dialog if silo-mod is not installed or import fails
  3. Added .kc file support to the fallback file dialog filter

Flow

  • User clicks "Open File" in Insert Component panel
  • If Silo available: opens OpenItemWidget in MDI subwindow — user searches by part number/description, selects item
  • Selected item is opened (from local path or synced from Silo), assembly doc is re-activated, part list refreshes
  • If Silo unavailable: standard OS file dialog (now also accepts .kc files)

Files Changed

File Change
src/Mod/Assembly/CommandInsertLink.py openFiles() → tries Silo browser first, falls back to OS dialog

Closes #202

## Problem When Silo is the active origin, Insert Component opens the OS native file dialog instead of a Silo part browser. ## Fix Modified `openFiles()` in `CommandInsertLink.py` to: 1. **Try importing the Silo `OpenItemWidget`** — if silo-mod is loaded, show the Silo part browser (search database + local files) instead of the OS dialog 2. **Fall back to OS file dialog** if silo-mod is not installed or import fails 3. **Added `.kc` file support** to the fallback file dialog filter ### Flow - User clicks "Open File" in Insert Component panel - If Silo available: opens `OpenItemWidget` in MDI subwindow — user searches by part number/description, selects item - Selected item is opened (from local path or synced from Silo), assembly doc is re-activated, part list refreshes - If Silo unavailable: standard OS file dialog (now also accepts `.kc` files) ## Files Changed | File | Change | |------|--------| | `src/Mod/Assembly/CommandInsertLink.py` | `openFiles()` → tries Silo browser first, falls back to OS dialog | Closes #202
forbes added 1 commit 2026-02-14 21:04:03 +00:00
fix: Insert Component uses Silo browser when available
All checks were successful
Build and Test / build (pull_request) Successful in 40m7s
8f02c0d6f2
When the silo workbench is loaded, Insert Component now opens the
Silo part browser (OpenItemWidget) instead of the OS file dialog.
Users can search both the Silo database and local files to find
components to insert.

Falls back to the OS file dialog if silo-mod is not installed.
Also adds .kc file support to the fallback file dialog filter.

Closes #202
forbes merged commit 54b1baa393 into main 2026-02-14 21:04:53 +00:00
forbes deleted branch fix/insert-component-silo 2026-02-14 21:04:53 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/create#222