Duplicate the current note
| 3484 | |
| 3485 | // Duplicate the current note |
| 3486 | void NixNote::duplicateCurrentNote() { |
| 3487 | tabWindow->currentBrowser()->saveNoteContent(); |
| 3488 | qint32 oldLid = tabWindow->currentBrowser()->lid; |
| 3489 | qint32 newLid; |
| 3490 | NoteTable ntable(global.db); |
| 3491 | newLid = ntable.duplicateNote(oldLid); |
| 3492 | |
| 3493 | FilterCriteria *criteria = new FilterCriteria(); |
| 3494 | global.filterCriteria[global.filterPosition]->duplicate(*criteria); |
| 3495 | criteria->setLid(newLid); |
| 3496 | global.filterCriteria.append(criteria); |
| 3497 | global.filterPosition++; |
| 3498 | openNote(false); |
| 3499 | updateSelectionCriteria(); |
| 3500 | tabWindow->currentBrowser()->editor->setFocus(); |
| 3501 | } |
| 3502 | |
| 3503 | |
| 3504 | // "Pin" the current note. This makes sure it appears in all searches |
nothing calls this directly
no test coverage detected