You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Relates to #317. Thank you to @jpbro for this suggestion, and my apologies for taking so long to implement it.
PhotoDemon now provides a Layer > Replace menu which has three options for updating the current layer's contents in-place:
1) From the clipboard
2) From an arbitrary image file
3) From the current image (visible layers merged together)
These options provide a convenient way to update the contents of an existing layer from an outside source, without the hassle of jumping through various Copy+Paste operations.
'Regardless of success or failure, make sure to close the clipboard now that we're done with it.
@@ -494,7 +494,9 @@ Friend Sub ClipboardPaste(ByVal srcIsMeantAsLayer As Boolean, Optional ByRef pas
494
494
Else
495
495
PDDebug.LogAction "WARNING! Couldn't open the clipboard; is it possible another program has locked it?"
496
496
End If
497
-
497
+
498
+
ClipboardPaste = pasteWasSuccessful
499
+
498
500
'If a paste operation was successful, switch the current tool to the layer move/resize tool, which is most likely needed after a
499
501
' new layer has been pasted.
500
502
If pasteWasSuccessful Then
@@ -575,7 +577,7 @@ Friend Sub ClipboardPaste(ByVal srcIsMeantAsLayer As Boolean, Optional ByRef pas
575
577
PDMsgBox "The clipboard is empty or it does not contain a valid picture format. Please copy a valid image onto the clipboard and try again.", vbExclamation Or vbOKOnly, "Error"
576
578
End If
577
579
578
-
End Sub
580
+
End Function
579
581
580
582
'If the clipboard contains internal PD-format data (most commonly a bare DIB), you can call this function to initiate a "paste" command
581
583
' using the internal data as a source. The parameter "srcIsMeantAsLayer" controls whether the clipboard data is loaded as a new image,
@@ -1634,7 +1636,7 @@ Private Function DragDrop_TextData(ByRef OLEDragDrop_DataObject As DataObject, O
0 commit comments