From 78540e03b9dd4528812835e5c40ede43ae9fc527 Mon Sep 17 00:00:00 2001 From: Lutz Roeder Date: Sun, 22 Sep 2024 08:53:37 -0700 Subject: [PATCH] Update view.js (#1363) --- source/view.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/view.js b/source/view.js index 17943fdf26..1cfab775b7 100644 --- a/source/view.js +++ b/source/view.js @@ -279,7 +279,7 @@ view.View = class { } find() { - if (this._graph) { + if (this._graph && this._sidebar.peek() instanceof view.FindSidebar !== true) { this._graph.select(null); const sidebar = new view.FindSidebar(this, this.activeGraph, this.activeSignature); sidebar.on('state-changed', (sender, state) => { @@ -2477,6 +2477,10 @@ view.Sidebar = class { this._update(this._stack.concat(entry)); } + peek() { + return this._stack.length > 0 ? this._stack[this._stack.length - 1].content : null; + } + _render(content) { try { content.render();