Skip to content

Commit

Permalink
add debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Timm committed Jun 27, 2024
1 parent 08686ea commit 0225e64
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions qml/content/CollageRenderer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,18 @@ Item {

// TODO clip the image and bringing everything into right format...
renderer.grabToImage(function(result) {
result.saveToFile(filename, Qt.size(backgroundRect.width, backgroundRect.height));
savedFilename = filename;
if (result) {
console.log("Image grabbed successfully");
var success = result.saveToFile(filename, Qt.size(backgroundRect.width, backgroundRect.height));
if (success) {
console.log("Image saved successfully to " + filename);
savedFilename = filename;
} else {
console.log("Failed to save image to " + filename);
}
} else {
console.log("Failed to grab image");
}
saving = false;
}, size);
}
Expand Down

0 comments on commit 0225e64

Please sign in to comment.