Skip to content

feat: add Quick Select (qselect) command with filter dialog#202

Merged
mlightcad merged 1 commit intomainfrom
feat/qselect
Apr 10, 2026
Merged

feat: add Quick Select (qselect) command with filter dialog#202
mlightcad merged 1 commit intomainfrom
feat/qselect

Conversation

@mlightcad
Copy link
Copy Markdown
Owner

@mlightcad mlightcad commented Apr 10, 2026

Summary

  • Introduce a new qselect command that opens a Quick Select dialog.
  • Add a reusable AcEdSelectionFilter and AcEditor.selectAll(filter) support in cad-simple-viewer.
  • Implement end-to-end Quick Select flow (criteria building, preview counts, apply modes, and i18n strings) in cad-viewer.

Why

  • Enable users to build selection sets by object properties (type, layer, color, linetype, lineweight) instead of manual picking.
  • Provide AutoCAD-like quick filtering workflows with support for replacing, adding to, or removing from current selections.

What Changed

  • Added command wiring:
  • AcApQSelectCmd to open QuickSelectDlg.
  • Registered qselect command and dialog in app bootstrap.
  • Added filtering primitives:
  • New AcEdSelectionFilter with DXF typed-value clauses and comparison operators (=, !=, >, >=, <, <=).
  • New AcEditor.selectAll(filter) API to return filtered model-space IDs without mutating selection by default.
  • Added Quick Select business logic in useQuickSelect.ts:
  • Source scopes: entire drawing or current selection.
  • Property/operator/value option generation.
  • Matched/source count calculation.
  • Apply modes: set, add, remove.
  • Added MlQuickSelectDlg.vue:
  • Form for scope/type/property/operator/value/mode.
  • Live preview of matched count.
  • Validation and success/warning feedback.
  • Added exports and i18n entries (EN/ZH) for command and dialog text.

Risks / Notes

  • Filtering and preview may iterate large model spaces, which could impact performance on very large drawings.
  • Numeric comparison currently treats lineWeight as numeric input; invalid numeric input paths rely on existing conversion behavior.

@mlightcad mlightcad self-assigned this Apr 10, 2026
@mlightcad mlightcad added the enhancement New feature or request label Apr 10, 2026
@mlightcad mlightcad merged commit fd80b8c into main Apr 10, 2026
2 checks passed
@mlightcad mlightcad deleted the feat/qselect branch April 10, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant