add: multi-select functionality in script editor#8056
add: multi-select functionality in script editor#8056vadi2 merged 7 commits intoMudlet:developmentfrom
Conversation
- Add ExtendedSelection mode to TTreeWidget for Ctrl+Click and Shift+Click support - Implement bulk delete operations with confirmation dialogs for multiple selected items - Add multi-item export functions for triggers, aliases, timers, scripts, actions, and keys - Implement VS Code-style paste where each selected item is pasted individually - Add folder-aware paste functionality to place items inside selected groups - Fix variable tree drag-drop to be consistent with other tree components - Resolve blank trigger creation issue during multi-item paste operations Closes Mudlet#655
|
This tests good. My concern is hitting the confirmation dialog for deletion every time. I am a power-user, I know I want to delete it. Can we make a "don't ask me again" box, or at the very least not ask on single item deletions (previously how it worked). Good work, let's see what the other reviewers say. |
|
@ZookaOnGit There could be a lot of issues if we implement that, unless a redo/undo option is available. Mistakes can happen . |
|
While I understand your point this is how the existing functionality works. A don't ask me again box would resolve both our concerns. undo/redo is a separate issue #707 Let's see what other reviewers thoughts are before changing anything though. |
|
I agree that we shouldn't get into the power users way, a checkbox not to ask again would be welcome - and this should be remembered globally in all profiles, since most likely it's the same person playing on all of the profiles, and we shouldn't make them tick it in every profile. @MAVRICK-1 you can store this preferences in QSettings provided by |
on it |
Screencast.from.2025-08-21.14-14-06.mp4@vadi2 @ZookaOnGit is it okay now ? |
- Add showDeleteConfirmation() helper function with QCheckBox support - Store preference globally in QSettings (works across all profiles) - Replace all 6 delete confirmation dialogs to use new helper - Addresses reviewer feedback about power users hitting confirmation dialogs - Default behavior unchanged - confirmations still shown by default - Once enabled, deletions proceed without interruption Fixes feedback on Mudlet#655
|
@ZookaOnGit @vadi2 friendly ping |
|
Tests good and fixes my concerns. Thank you. |
# Multi-Selection Functionality for Script Editor ## Summary Implements comprehensive multi-selection functionality in Mudlet's script editor, addressing GitHub issue Mudlet#655. This enhancement brings modern file manager-style selection and operations to all script editor tree widgets (triggers, aliases, timers, scripts, actions, keys, and variables). ### Edge Cases Handled - Empty clipboard content - Invalid XML in clipboard - Mixed item types in selection - Pasting with no target selected - Variable tree consistency with other components ## Before/After Comparison ### Before - ❌ Single selection only - ❌ One-by-one copy/paste operations - ❌ Individual delete operations - ❌ Inconsistent variable tree behavior - ❌ Blank trigger creation during paste ### After - ✅ Multi-selection with Ctrl+Click and Shift+Click - ✅ Bulk copy/paste operations - ✅ Bulk delete with confirmation - ✅ Consistent behavior across all tree types - ✅ Clean paste without blank entries - ✅ Folder-aware paste functionality ## Performance Impact - **Minimal overhead**: Uses Qt's built-in ExtendedSelection mode - **Efficient operations**: Processes multiple items in single transactions - **Memory friendly**: Proper cleanup of temporary clipboard states ## Compatibility - **Backwards compatible**: Existing single-selection workflows unchanged - **Cross-platform**: Uses standard Qt selection mechanisms - **No breaking changes**: All existing functionality preserved ## Related Issues Closes Mudlet#655 - Multi-selection in script editor ## Screenshots/Demo https://github.com/user-attachments/assets/2f626ef4-6d77-491a-9fb5-22b8f24f84bc https://github.com/user-attachments/assets/d7becefe-2670-4ec0-9d2c-53715f9ac6aa The multi-selection functionality works exactly like modern file managers: - Hold Ctrl and click to select multiple individual items - Hold Shift and click to select ranges - Right-click or use keyboard shortcuts for bulk operations - Paste behavior mimics VS Code where each item is pasted separately /claim Mudlet#655 --------- Co-authored-by: Vadim Peretokin <vperetokin@hey.com> Co-authored-by: Zooka <136661366+ZookaOnGit@users.noreply.github.com>
<!-- Keep the title short & concise so anyone non-technical can
understand it,
the title appears in PTB changelogs -->
#### Brief overview of PR changes/additions
Adjusted trigger editor selection handler to prevent clearing the newly
pasted trigger before it gets saved
Fix: #8249 pasted trigger via loose content
this was originated after a litle collateral after #8056
#### Motivation for adding to Mudlet
Fix 8249
#### Other info (issues closed, discussion etc)
this could be related to issues 8259 and 8293. as first step to solve
(but this PR dont solve thoise)
Signed-off-by: SammerPetria <sammerpetria@gmail.com>
Multi-Selection Functionality for Script Editor
Summary
Implements comprehensive multi-selection functionality in Mudlet's script editor, addressing GitHub issue #655. This enhancement brings modern file manager-style selection and operations to all script editor tree widgets (triggers, aliases, timers, scripts, actions, keys, and variables).
Edge Cases Handled
Before/After Comparison
Before
After
Performance Impact
Compatibility
Related Issues
Closes #655 - Multi-selection in script editor
Screenshots/Demo
Screencast.from.2025-08-18.09-59-00.mp4
Screencast.from.2025-08-18.09-59-34.mp4
The multi-selection functionality works exactly like modern file managers:
/claim #655