Only show option to upload image from clipboard when there is image in
clipboard.
This commit is contained in:
@@ -181,7 +181,21 @@ Control {
|
||||
icon: "\ue226"
|
||||
}
|
||||
|
||||
onClicked: attachDialog.open()
|
||||
onClicked: {
|
||||
if (imageClipboard.hasImage) {
|
||||
attachDialog.open()
|
||||
} else {
|
||||
var fileDialog = openFileDialog.createObject(ApplicationWindow.overlay)
|
||||
|
||||
fileDialog.chosen.connect(function(path) {
|
||||
if (!path) return
|
||||
|
||||
roomPanelInput.attach(path)
|
||||
})
|
||||
|
||||
fileDialog.open()
|
||||
}
|
||||
}
|
||||
|
||||
BusyIndicator {
|
||||
anchors.fill: parent
|
||||
@@ -428,10 +442,6 @@ Control {
|
||||
}
|
||||
}
|
||||
|
||||
ImageClipboard {
|
||||
id: imageClipboard
|
||||
}
|
||||
|
||||
function insert(str) {
|
||||
inputField.insert(inputField.cursorPosition, str)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user