From a355f32c1e8c2e9f03a7677c4c6493aabd498099 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Thu, 1 Oct 2020 14:43:36 -0700 Subject: [PATCH] Show error for editing binary file --- IDE/src/ui/SourceEditWidgetContent.bf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/IDE/src/ui/SourceEditWidgetContent.bf b/IDE/src/ui/SourceEditWidgetContent.bf index 66cd5da0..53bd310b 100644 --- a/IDE/src/ui/SourceEditWidgetContent.bf +++ b/IDE/src/ui/SourceEditWidgetContent.bf @@ -525,7 +525,9 @@ namespace IDE.ui } if (mSourceViewPanel != null) { - if ((!sReadOnlyErrorShown) && (mSourceViewPanel.[Friend]mCurrentVersionPanel != null)) + if (mSourceViewPanel.mIsBinary) + IDEApp.sApp.Fail("Cannot edit binary file."); + else if ((!sReadOnlyErrorShown) && (mSourceViewPanel.[Friend]mCurrentVersionPanel != null)) IDEApp.sApp.Fail("Switch to the current version of this file to edit it."); else IDEApp.Beep(IDEApp.MessageBeepType.Error);