fix configuration dialog error

even if user selects Cancel in font dialog html codes pasted
This commit is contained in:
2016-04-20 15:50:45 +03:00
parent 139554578c
commit f8e9945bc4
3 changed files with 11 additions and 3 deletions

View File

@ -73,6 +73,11 @@ Item {
"size": plasmoid.configuration.fontSize
}
var font = awActions.getFont(defaultFont)
if (font.applied != 1) {
if (debug) console.debug("No font selected")
return
}
var selected = textPattern.selectedText
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
textPattern.insert(textPattern.cursorPosition,