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();
|
||||
}
|
||||
|
||||
WithSourceViewPanels(scope (sourceViewPanel) =>
|
||||
{
|
||||
sourceViewPanel.Dispose();
|
||||
});
|
||||
|
||||
if (!mRunningTestScript)
|
||||
{
|
||||
mActiveDocumentsTabbedView = null;
|
||||
|
@ -5712,14 +5717,20 @@ namespace IDE
|
|||
{
|
||||
let sewc = editWidget.mEditWidgetContent as SourceEditWidgetContent;
|
||||
if (sewc != null)
|
||||
{
|
||||
if (sewc.mEditWidget.mHasFocus)
|
||||
return sewc;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var activeTextPanel = GetActivePanel() as TextPanel;
|
||||
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;
|
||||
|
|
|
@ -139,6 +139,7 @@ namespace IDE.ui
|
|||
mOutputWidget.SetText("");
|
||||
for (var widgetEntry in mInlineWidgets)
|
||||
{
|
||||
if (widgetEntry.mWidget.mParent != null)
|
||||
widgetEntry.mWidget.RemoveSelf();
|
||||
delete widgetEntry.mWidget;
|
||||
}
|
||||
|
|
|
@ -2275,6 +2275,9 @@ namespace IDE.ui
|
|||
|
||||
public void DuplicateLine()
|
||||
{
|
||||
if ((CheckReadOnly()) || (!mAllowVirtualCursor))
|
||||
return;
|
||||
|
||||
UndoBatchStart undoBatchStart = new UndoBatchStart("duplicateLine");
|
||||
mData.mUndoManager.Add(undoBatchStart);
|
||||
|
||||
|
|
|
@ -546,11 +546,6 @@ namespace IDE.ui
|
|||
|
||||
public ~this()
|
||||
{
|
||||
if (mProjectSource?.mEditData?.HasTextChanged() == true)
|
||||
{
|
||||
mProjectSource.ClearEditData();
|
||||
}
|
||||
|
||||
if (mInPostRemoveUpdatePanels)
|
||||
{
|
||||
//Debug.WriteLine("Removing sourceViewPanel from mPostRemoveUpdatePanel {0} in ~this ", this);
|
||||
|
@ -1185,7 +1180,7 @@ namespace IDE.ui
|
|||
//if (mCurParser != null)
|
||||
{
|
||||
if (gApp.mWorkspace.mProjectLoadState != .Loaded)
|
||||
return false;
|
||||
return true;
|
||||
|
||||
if (!isHi)
|
||||
Debug.Assert(!mIsPerformingBackgroundClassify);
|
||||
|
@ -2333,6 +2328,11 @@ namespace IDE.ui
|
|||
if (mDisposed)
|
||||
return;
|
||||
|
||||
if (mProjectSource?.mEditData?.HasTextChanged() == true)
|
||||
{
|
||||
mProjectSource.ClearEditData();
|
||||
}
|
||||
|
||||
ProcessDeferredResolveResults(-1);
|
||||
|
||||
if (IDEApp.sApp.mLastActiveSourceViewPanel == this)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue