fix(dock): fix build break and clean up logging/event patterns
This commit is contained in:
@@ -72,7 +72,6 @@ public partial class App : Application
|
|||||||
app._secondaryWindows.Remove(newWindow);
|
app._secondaryWindows.Remove(newWindow);
|
||||||
}
|
}
|
||||||
newWindow.Close();
|
newWindow.Close();
|
||||||
Logger.LogError(ex);
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -442,8 +442,14 @@ public sealed partial class DockLayout : Control
|
|||||||
|
|
||||||
var result = TabTearOffService.TryTearOffTab(sourceNode.Items, args.Item, (tab) =>
|
var result = TabTearOffService.TryTearOffTab(sourceNode.Items, args.Item, (tab) =>
|
||||||
{
|
{
|
||||||
|
var handler = TabTornOff;
|
||||||
|
if (handler == null)
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException("No tear-off handler attached.");
|
||||||
|
}
|
||||||
|
|
||||||
// Raise event to let the host handle window creation
|
// Raise event to let the host handle window creation
|
||||||
TabTornOff.Invoke(this, new TabTornOffEventArgs(tab, sourceNode));
|
handler.Invoke(this, new TabTornOffEventArgs(tab, sourceNode));
|
||||||
}, sourceNode);
|
}, sourceNode);
|
||||||
|
|
||||||
if (result.IsSuccess)
|
if (result.IsSuccess)
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using Ghost.Editor.Core.Services;
|
|||||||
using Ghost.Editor.Core.Controls.Internal.Docking;
|
using Ghost.Editor.Core.Controls.Internal.Docking;
|
||||||
using Ghost.Editor.View.Controls;
|
using Ghost.Editor.View.Controls;
|
||||||
using Ghost.Editor.ViewModels.Windows;
|
using Ghost.Editor.ViewModels.Windows;
|
||||||
|
using Microsoft.UI.Xaml;
|
||||||
using Windows.ApplicationModel;
|
using Windows.ApplicationModel;
|
||||||
using WinUIEx;
|
using WinUIEx;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user