File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 44
55- You can now **add a link to a card** to the current note in the
66 **Nextcloud Deck dialog** (for [#3357](https://github.com/pbek/QOwnNotes/issues/3357))
7+ - In _note tree mode_, if only one folder is selected, you can delete it with the `Del` key
8+ (for [#3374](https://github.com/pbek/QOwnNotes/issues/3374))
79
810## 25.10.1
911
Original file line number Diff line number Diff line change @@ -4704,11 +4704,17 @@ void MainWindow::removeSelectedNotes() {
47044704 // store updated notes to disk
47054705 storeUpdatedNotesToDisk ();
47064706
4707- const int selectedItemsCount = getSelectedNotesCount ();
4707+ const auto selItems = ui->noteTreeWidget ->selectedItems ();
4708+ const int selectedItemsCount = selItems.count ();
47084709
47094710 if (selectedItemsCount == 0 ) {
47104711 return ;
47114712 }
4713+ if (selectedItemsCount == 1 && selItems[0 ]->data (0 , Qt::UserRole + 1 ) == FolderType) {
4714+ // If just one folder is selected, remove the folder
4715+ NoteSubFolderTree::removeSelectedNoteSubFolders (ui->noteTreeWidget );
4716+ return ;
4717+ }
47124718
47134719 if (Utils::Gui::question (
47144720 this , tr (" Remove selected notes" ),
@@ -4741,7 +4747,6 @@ void MainWindow::removeSelectedNotes() {
47414747 const QSignalBlocker blocker1 (ui->noteTreeWidget );
47424748 Q_UNUSED (blocker1)
47434749
4744- const auto selItems = ui->noteTreeWidget ->selectedItems ();
47454750 for (QTreeWidgetItem *item : selItems) {
47464751 if (item->data (0 , Qt::UserRole + 1 ) != NoteType) {
47474752 continue ;
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ class NoteSubFolderTree : public QTreeWidget {
2020 void reload ();
2121
2222 static QMenu *contextMenu (QTreeWidget *parent);
23+ static void removeSelectedNoteSubFolders (QTreeWidget *treeWidget);
2324
2425 public Q_SLOTS:
2526 void onItemExpanded (QTreeWidgetItem *item);
@@ -30,8 +31,6 @@ class NoteSubFolderTree : public QTreeWidget {
3031 void onItemChanged (QTreeWidgetItem *item, int column);
3132 void onItemSelectionChanged ();
3233
33- static void removeSelectedNoteSubFolders (QTreeWidget *treeWidget);
34-
3534 Q_SIGNALS:
3635 void currentSubFolderChanged ();
3736 void multipleSubfoldersSelected ();
You can’t perform that action at this time.
0 commit comments