capi:graph-pane scrolling spontaneously on activating window on LWW4.3
Hello lispworkers,
Please take a look at the simplified excerpt from
examples/capi/graphics/graph-pane.lisp
(capi:define-interface graph-pane-test ()
()
(:panes
(advanced-graph-pane capi:graph-pane
:interaction :no-selection
:title "Advanced Graph:"
:roots '(1)
:children-function 'children-function
:node-pane-function 'make-pane-for-node))
(:layouts
(main-layout capi:column-layout '(advanced-graph-pane)))
(:default-initargs
:layout 'main-layout
:title "Graph Pane Test"
:best-width 200 :best-height 200))
(defun make-pane-for-node (graph-pane node)
(declare (ignore graph-pane))
(cond
((< node 4)
(make-instance 'capi:push-button :data node))
((< node 8)
(make-instance 'capi:check-button :data node))
((eq (mod node 2) 1)
(make-instance 'capi:text-input-pane :text (princ-to-string node)))
(t
(make-instance 'capi:item-pinboard-object :data node))))
(defun children-function (x)
(when (< x 8)
(list (* x 2) (1+ (* x 2)))))
(capi:display (make-instance 'graph-pane-test))
Make the Graph Pane Test window small enough and scroll the graph to the
right-most position. Switch to another window then back to the Graph Pane
Test. The graph seems to auto scroll back to the left-most.
The behavior is related to horizontal scroll only - vertical scroll position
is being retained as expected.
Is this by design?
--
Sincerely,
Dmitri Ivanov
lisp.ystok.ru