1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Added fixit for adding enum cases

This commit is contained in:
Brian Fiete 2020-02-06 16:47:37 -08:00
parent 75afbd4a3e
commit 7a5dd90cff
7 changed files with 247 additions and 147 deletions

View file

@ -237,11 +237,6 @@ namespace IDE.ui
//Debug.WriteLine("Init {} {} {} {}", this, mIsInitted, mOwnsWindow, mAutoComplete);
if (WidgetWindow.sOnMouseDown.Count > 0)
{
NOP!();
}
if (mOwnsWindow)
{
WidgetWindow.sOnWindowLostFocus.Add(new => LostFocusHandler);
@ -369,7 +364,6 @@ namespace IDE.ui
public ~this()
{
}
public void Draw(Graphics g)
@ -2187,6 +2181,12 @@ namespace IDE.ui
SourceViewPanel sourceViewPanel = IDEApp.sApp.ShowSourceFile(fixitFileName);
if (sourceViewPanel != null)
{
if (sourceViewPanel.IsReadOnly)
{
gApp.Fail(scope String()..AppendF("The selected fixit cannot be applied to locked file '{}'", sourceViewPanel.mFilePath));
return;
}
var targetSourceEditWidgetContent = mTargetEditWidget.Content as SourceEditWidgetContent;
var history = targetSourceEditWidgetContent.RecordHistoryLocation();
history.mNoMerge = true;