Skip to content

Commit 6483b25

Browse files
committed
Merge pull request #795 from SlavaRa/feature/issue791
Now you can cancel command of move file[s]
2 parents 88d3382 + 84fd3f5 commit 6483b25

File tree

1 file changed

+7
-1
lines changed
  • External/Plugins/CodeRefactor/Commands

1 file changed

+7
-1
lines changed

External/Plugins/CodeRefactor/Commands/Move.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,13 @@ protected override void ExecutionImplementation()
108108
msg = TextHelper.GetString("Info.MovingFile");
109109
title = TextHelper.GetString("Title.MoveDialog");
110110
}
111-
if (targets.Count > 0 && MessageBox.Show(msg, title, MessageBoxButtons.YesNo) == DialogResult.Yes)
111+
var dialogResult = MessageBox.Show(msg, title, MessageBoxButtons.YesNoCancel);
112+
if (dialogResult == DialogResult.Cancel)
113+
{
114+
FireOnRefactorComplete();
115+
return;
116+
}
117+
if (targets.Count > 0 && dialogResult == DialogResult.Yes)
112118
{
113119
// We must keep the original files for validating references
114120
CopyTargets();

0 commit comments

Comments
 (0)