MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / duplicateCurrentNote

Method duplicateCurrentNote

nixnote.cpp:3486–3501  ·  view source on GitHub ↗

Duplicate the current note

Source from the content-addressed store, hash-verified

3484
3485// Duplicate the current note
3486void 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

Callers

nothing calls this directly

Calls 5

saveNoteContentMethod · 0.80
currentBrowserMethod · 0.80
duplicateNoteMethod · 0.80
duplicateMethod · 0.80
setLidMethod · 0.45

Tested by

no test coverage detected