mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-15 14:54:09 +02:00
Editor fixes
This commit is contained in:
parent
5c320fa9c9
commit
1155bd9600
4 changed files with 24 additions and 9 deletions
|
@ -2314,6 +2314,11 @@ namespace IDE
|
||||||
widget.RemoveSelf();
|
widget.RemoveSelf();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WithSourceViewPanels(scope (sourceViewPanel) =>
|
||||||
|
{
|
||||||
|
sourceViewPanel.Dispose();
|
||||||
|
});
|
||||||
|
|
||||||
if (!mRunningTestScript)
|
if (!mRunningTestScript)
|
||||||
{
|
{
|
||||||
mActiveDocumentsTabbedView = null;
|
mActiveDocumentsTabbedView = null;
|
||||||
|
@ -5712,14 +5717,20 @@ namespace IDE
|
||||||
{
|
{
|
||||||
let sewc = editWidget.mEditWidgetContent as SourceEditWidgetContent;
|
let sewc = editWidget.mEditWidgetContent as SourceEditWidgetContent;
|
||||||
if (sewc != null)
|
if (sewc != null)
|
||||||
return sewc;
|
{
|
||||||
|
if (sewc.mEditWidget.mHasFocus)
|
||||||
|
return sewc;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var activeTextPanel = GetActivePanel() as TextPanel;
|
var activeTextPanel = GetActivePanel() as TextPanel;
|
||||||
if (activeTextPanel != null)
|
if (activeTextPanel != null)
|
||||||
{
|
{
|
||||||
return activeTextPanel.EditWidget.mEditWidgetContent as SourceEditWidgetContent;
|
let sewc = activeTextPanel.EditWidget.mEditWidgetContent as SourceEditWidgetContent;
|
||||||
|
if ((sewc != null) && (sewc.mEditWidget.mHasFocus))
|
||||||
|
return sewc;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -139,7 +139,8 @@ namespace IDE.ui
|
||||||
mOutputWidget.SetText("");
|
mOutputWidget.SetText("");
|
||||||
for (var widgetEntry in mInlineWidgets)
|
for (var widgetEntry in mInlineWidgets)
|
||||||
{
|
{
|
||||||
widgetEntry.mWidget.RemoveSelf();
|
if (widgetEntry.mWidget.mParent != null)
|
||||||
|
widgetEntry.mWidget.RemoveSelf();
|
||||||
delete widgetEntry.mWidget;
|
delete widgetEntry.mWidget;
|
||||||
}
|
}
|
||||||
mInlineWidgets.Clear();
|
mInlineWidgets.Clear();
|
||||||
|
|
|
@ -2275,6 +2275,9 @@ namespace IDE.ui
|
||||||
|
|
||||||
public void DuplicateLine()
|
public void DuplicateLine()
|
||||||
{
|
{
|
||||||
|
if ((CheckReadOnly()) || (!mAllowVirtualCursor))
|
||||||
|
return;
|
||||||
|
|
||||||
UndoBatchStart undoBatchStart = new UndoBatchStart("duplicateLine");
|
UndoBatchStart undoBatchStart = new UndoBatchStart("duplicateLine");
|
||||||
mData.mUndoManager.Add(undoBatchStart);
|
mData.mUndoManager.Add(undoBatchStart);
|
||||||
|
|
||||||
|
|
|
@ -546,11 +546,6 @@ namespace IDE.ui
|
||||||
|
|
||||||
public ~this()
|
public ~this()
|
||||||
{
|
{
|
||||||
if (mProjectSource?.mEditData?.HasTextChanged() == true)
|
|
||||||
{
|
|
||||||
mProjectSource.ClearEditData();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mInPostRemoveUpdatePanels)
|
if (mInPostRemoveUpdatePanels)
|
||||||
{
|
{
|
||||||
//Debug.WriteLine("Removing sourceViewPanel from mPostRemoveUpdatePanel {0} in ~this ", this);
|
//Debug.WriteLine("Removing sourceViewPanel from mPostRemoveUpdatePanel {0} in ~this ", this);
|
||||||
|
@ -1185,7 +1180,7 @@ namespace IDE.ui
|
||||||
//if (mCurParser != null)
|
//if (mCurParser != null)
|
||||||
{
|
{
|
||||||
if (gApp.mWorkspace.mProjectLoadState != .Loaded)
|
if (gApp.mWorkspace.mProjectLoadState != .Loaded)
|
||||||
return false;
|
return true;
|
||||||
|
|
||||||
if (!isHi)
|
if (!isHi)
|
||||||
Debug.Assert(!mIsPerformingBackgroundClassify);
|
Debug.Assert(!mIsPerformingBackgroundClassify);
|
||||||
|
@ -2333,6 +2328,11 @@ namespace IDE.ui
|
||||||
if (mDisposed)
|
if (mDisposed)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (mProjectSource?.mEditData?.HasTextChanged() == true)
|
||||||
|
{
|
||||||
|
mProjectSource.ClearEditData();
|
||||||
|
}
|
||||||
|
|
||||||
ProcessDeferredResolveResults(-1);
|
ProcessDeferredResolveResults(-1);
|
||||||
|
|
||||||
if (IDEApp.sApp.mLastActiveSourceViewPanel == this)
|
if (IDEApp.sApp.mLastActiveSourceViewPanel == this)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue