- and = are on the bar for a drawing, not a lane

With a lane's row selected they lengthened the whole lane, which is
not what holding a drawing longer means. They show for a cel or a
symbol, and not for the row that places a lane.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011FLuCjp9kNH6ovwJVXSbq9
This commit is contained in:
Olive Vaughn 2026-10-11 00:07:34 -04:00
parent 796bb9ae6b
commit 571e80d975

View file

@ -540,12 +540,23 @@
[delta]
(fn [db] (when-let [p (ui/span-path db)] [::ui/slide p delta :out true])))
(defn- places-lane?
"Does the row at `path` in the open symbol place a lane? Holding a lane
longer is not lengthening a drawing, which is what = and − are on the bar for."
[db path]
(let [{document :clip st :store} (store/entry (:clip/current db))
f (ui/editing-frame db document)
host (nest/inside document st (get-in db [:ui :open]) (pop path) f)
n (get-in document [:symbols (:sid host) :nodes (peek path)])]
(boolean (some->> (node/source n) (clip/symbol document) symbol/lane?))))
(rf/reg-sub
::here
;; Which of the toolbar's commands mean something for the selection right now.
(fn [db _]
{:lane? (some? (ui/lane-here db))
:span? (some? (ui/span-path db))}))
(let [p (ui/span-path db)]
{:lane? (some? (ui/lane-here db))
:span? (and (some? p) (not (places-lane? db p)))})))
;; ---------------------------------------------------------------------------
;; the panes