Skip to content

Commit

Permalink
IJMP-1614 Fixed graying of the copied file when there is a conflict i…
Browse files Browse the repository at this point in the history
…n drag and drop
  • Loading branch information
Katsiaryna Tsytsenia committed Jun 25, 2024
1 parent 09cd986 commit 3cdb982
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import eu.ibagroup.formainframe.analytics.events.FileEvent
import eu.ibagroup.formainframe.common.ui.cleanInvalidateOnExpand
import eu.ibagroup.formainframe.dataops.DataOpsManager
import eu.ibagroup.formainframe.dataops.attributes.RemoteDatasetAttributes
import eu.ibagroup.formainframe.dataops.attributes.RemoteMemberAttributes
import eu.ibagroup.formainframe.dataops.attributes.RemoteUssAttributes
import eu.ibagroup.formainframe.dataops.operations.mover.MoveCopyOperation
import eu.ibagroup.formainframe.explorer.FileExplorerContentProvider
Expand Down Expand Up @@ -367,7 +368,12 @@ class ExplorerPasteProvider : PasteProvider {
val conflictResolution = conflictsResolutions
.find { it.sourceFile == sourceFile && it.destinationFile == destFile }
if (conflictResolution?.shouldSkip() == true) {
if (isDragAndDrop) {
val srcAttr = dataOpsManager.tryToGetAttributes(sourceFile)
val destAttr = dataOpsManager.tryToGetAttributes(destFile)
if (isDragAndDrop &&
(((srcAttr is RemoteMemberAttributes) && (destAttr is RemoteDatasetAttributes))
|| (srcAttr?.javaClass == destAttr?.javaClass))
) {
copyPasteSupport.removeFromBuffer { it.file == sourceFile }
}
return@mapNotNull null
Expand Down

0 comments on commit 3cdb982

Please sign in to comment.