@@ -689,6 +689,7 @@ private variable mIndentPixels as Integer
689689private variable mHoverRow as Integer
690690private variable mHoverIcon as String
691691private variable mMouseDownRow as Integer
692+ private variable mScrolledSinceMouseDown as Boolean
692693
693694private variable mFrameBorder as Boolean
694695private variable mShowHover as Boolean
@@ -1156,6 +1157,7 @@ public handler OnMouseDown() returns nothing
11561157 else
11571158 put yPosToRowNumber(the y of the mouse position) into mMouseDownRow
11581159 end if
1160+ put false into mScrolledSinceMouseDown
11591161end handler
11601162
11611163public handler OnMouseMove() returns nothing
@@ -1271,6 +1273,11 @@ public handler OnClick() returns nothing
12711273 return
12721274 end if
12731275
1276+ // Just return if top position has changed (view was scrolled)
1277+ if mScrolledSinceMouseDown then
1278+ return
1279+ end if
1280+
12741281 // If the first row was clicked then add a new element
12751282 if mHoverRow is 1 then
12761283 addBaseLevelElement()
@@ -2558,6 +2565,7 @@ end handler
25582565private handler setViewTopPosition(in pViewTopPosition as Real) returns nothing
25592566 if pViewTopPosition is not mViewTopPosition then
25602567 put pViewTopPosition into mViewTopPosition
2568+ put true into mScrolledSinceMouseDown
25612569 ensureViewTopPosition()
25622570 updateFirstDataItem()
25632571 updateScrollbar(mViewWidth, mViewHeight, mDataHeight, mViewTopPosition)
0 commit comments