mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-21 16:38:23 +01:00
restart block controllers for initial tab when creating a window as well
This commit is contained in:
parent
ae24e46ece
commit
bc18869b2e
12
main.go
12
main.go
@ -80,6 +80,18 @@ func createWindow(windowData *wstore.Window, app *application.App) {
|
|||||||
eventbus.UnregisterWailsWindow(window.ID())
|
eventbus.UnregisterWailsWindow(window.ID())
|
||||||
})
|
})
|
||||||
window.Show()
|
window.Show()
|
||||||
|
go func() {
|
||||||
|
time.Sleep(100 * time.Millisecond)
|
||||||
|
objectService := &objectservice.ObjectService{}
|
||||||
|
uiContext := wstore.UIContext{
|
||||||
|
WindowId: windowData.OID,
|
||||||
|
ActiveTabId: windowData.ActiveTabId,
|
||||||
|
}
|
||||||
|
_, err := objectService.SetActiveTab(uiContext, windowData.ActiveTabId)
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("error setting active tab for new window: %v\n", err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
type waveAssetHandler struct {
|
type waveAssetHandler struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user