Skip to content

Commit 56987a6

Browse files
committed
Remove the unnecessary check on the ShowDialog
1 parent ac7cd64 commit 56987a6

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

Rubberduck.Core/UI/Refactorings/RefactoringDialogBaseGeneric.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,8 @@ public RefactoringDialogBase(TModel model, TView view, TViewModel viewModel)
2626
public new RefactoringDialogResult DialogResult { get; protected set; }
2727
public new virtual RefactoringDialogResult ShowDialog()
2828
{
29+
// The return of ShowDialog is meaningless; we use the DialogResult which the commands set.
2930
var result = base.ShowDialog();
30-
if (result == System.Windows.Forms.DialogResult.OK || result == System.Windows.Forms.DialogResult.Yes)
31-
{
32-
DialogResult = RefactoringDialogResult.Execute;
33-
}
34-
else
35-
{
36-
DialogResult = RefactoringDialogResult.Cancel;
37-
}
38-
3931
return DialogResult;
4032
}
4133

0 commit comments

Comments
 (0)