1
0
Fork 0
mirror of https://github.com/marty-oehme/scripts.git synced 2024-11-18 07:48:07 +00:00
qownnotes-scripts/disable-readonly-mode/disable-readonly-mode.qml

21 lines
525 B
QML
Raw Permalink Normal View History

2018-08-05 07:11:18 +00:00
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();
}
}