mirror of
https://github.com/marty-oehme/scripts.git
synced 2024-11-18 15:58:07 +00:00
21 lines
525 B
QML
21 lines
525 B
QML
|
import QtQml 2.0
|
||
|
import QOwnNotesTypes 1.0
|
||
|
|
||
|
/**
|
||
|
* This script will disable the read-only mode if a note is double clicked
|
||
|
*/
|
||
|
Script {
|
||
|
/**
|
||
|
* This function is called after a note was double clicked
|
||
|
*
|
||
|
* @param {NoteApi} note - the note object that was clicked
|
||
|
*/
|
||
|
function noteDoubleClickedHook(note) {
|
||
|
// disable the read-only mode
|
||
|
script.triggerMenuAction("actionAllow_note_editing", 1);
|
||
|
|
||
|
// focus the note text edit
|
||
|
mainWindow.focusNoteTextEdit();
|
||
|
}
|
||
|
}
|