Changeset main,75 for main


Ignore:
Timestamp:
11/30/2007 06:51:51 PM (19 years ago)
Author:
David Owen <dsowen@…>
branch-nick:
tui
revision id:
dsowen@fugue88.ws-20071130185151-em9s4upwi2dwsles
Message:

Allow no row to be selected when there are no data rows.

Location:
main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/grid/row-selectable.lisp

    r62 r75  
    44
    55(defclass row-selectable ()
    6   ((selected-row :type (integer 0) :initform 0 :accessor selected-row)))
     6  ((selected-row :type (or null (integer 0))
     7                 :initform 0
     8                 :accessor selected-row)))
    79
    810
     
    1113  ;; TODO: This was hacked to take out header rows from other classes
    1214  ;; that I wish didn't affect the call.
    13   (call-next-method (bound i 0 (- (rows d) (header-rows d) 1)) d))
     15  (call-next-method (bound (if i i 0) 0 (- (rows d) (header-rows d) 1)) d))
    1416
    1517(defvar *recursive* nil)
  • main/simple-table.lisp

    r73 r75  
    5757    (flet ((notify ()
    5858             (funcall select-callback)
    59              (when (ensure-row-visible grid (1+ (selected-row model)))
    60                (funcall scroll-callback))))
     59             (let ((row (selected-row model)))
     60               (when (and row (ensure-row-visible grid (1+ row)))
     61                 (funcall scroll-callback)))))
    6162      (notify)
    6263      (loop
Note: See TracChangeset for help on using the changeset viewer.