From 14d5e2004f5e8764222d2fcab4333ffd200d2867 Mon Sep 17 00:00:00 2001 From: Kai O'Reilly Date: Thu, 11 Jul 2024 10:32:36 -0700 Subject: [PATCH] update to more core cleanup changes --- canvas/tree.go | 4 ++-- code/filetree.go | 2 +- numbers/databrowser/filetree.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/canvas/tree.go b/canvas/tree.go index 230ec1f0..678b8182 100644 --- a/canvas/tree.go +++ b/canvas/tree.go @@ -79,7 +79,7 @@ func (gv *Canvas) CopySelected() { //types:add return } tv := gv.Tree() - tv.SetSelectedViews(tvl) + tv.SetSelectedNodes(tvl) tvl[0].Copy() // operates on first element in selection gv.SetStatus("Copied selected items") } @@ -97,7 +97,7 @@ func (gv *Canvas) CutSelected() { //types:add sv.EditState().ResetSelected() tv := gv.Tree() // tv.SetFullReRender() - tv.SetSelectedViews(tvl) + tv.SetSelectedNodes(tvl) tvl[0].Cut() // operates on first element in selection gv.SetStatus("Cut selected items") tv.Resync() // todo: should not be needed diff --git a/code/filetree.go b/code/filetree.go index 7d44afe5..428758af 100644 --- a/code/filetree.go +++ b/code/filetree.go @@ -261,7 +261,7 @@ func (fn *FileNode) RenameFiles() { } ge.SaveAllCheck(true, func() { var nodes []*FileNode - sels := fn.SelectedViews() + sels := fn.GetSelectedNodes() for i := len(sels) - 1; i >= 0; i-- { sn := sels[i].(*FileNode) nodes = append(nodes, sn) diff --git a/numbers/databrowser/filetree.go b/numbers/databrowser/filetree.go index 48d8a29e..376ad263 100644 --- a/numbers/databrowser/filetree.go +++ b/numbers/databrowser/filetree.go @@ -37,7 +37,7 @@ func (fn *FileNode) OnDoubleClick(e events.Event) { if !ok { return } - sels := fn.SelectedViews() + sels := fn.GetSelectedNodes() if len(sels) > 0 { sn := filetree.AsNode(sels[len(sels)-1]) if sn != nil {