[q-lang-cvs] qcalc qcalc.q,1.101,1.102
                
                Brought to you by:
                
                    agraef
                    
                
            
            
        
        
        
    | 
      
      
      From: Albert G. <ag...@us...> - 2007-11-07 04:37:52
      
     | 
| Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12254 Modified Files: qcalc.q Log Message: bugfixes Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.101 retrieving revision 1.102 diff -C2 -d -r1.101 -r1.102 *** qcalc.q 7 Nov 2007 03:50:40 -0000 1.101 --- qcalc.q 7 Nov 2007 04:37:46 -0000 1.102 *************** *** 772,782 **** /* KLUDGE: Stop editing a GUI element before we clear the cell. Otherwise the cell seems to be stuck in editing mode (Qt bug?). */ ! = qt TABLE "clearCellWidget" (I,J) || ! qt TABLE "takeItem" X || ! qt TABLE "setEditMode" (qt_val "QTable" "NotEditing",I,J) || ! //if qt TABLE "isEditing" () then puts "PANIC!\n" || ! fail // falls through to default case below ! where X:QtObject = get CELLS!(I,J) ! if qt TABLE "isEditing" () and then ((I,J)=current_cell); = qt TABLE "clearCell" (I,J); --- 772,783 ---- /* KLUDGE: Stop editing a GUI element before we clear the cell. Otherwise the cell seems to be stuck in editing mode (Qt bug?). */ ! // This doesn't appear to work (causes segfaults). Disabled for now. ! // = qt TABLE "clearCellWidget" (I,J) || ! // qt TABLE "takeItem" X || ! // qt TABLE "setEditMode" (qt_val "QTable" "NotEditing",I,J) || ! // //if qt TABLE "isEditing" () then puts "PANIC!\n" || ! // fail // falls through to default case below ! // where X:QtObject = get CELLS!(I,J) ! // if qt TABLE "isEditing" () and then ((I,J)=current_cell); = qt TABLE "clearCell" (I,J); *************** *** 1404,1408 **** sel_val (I,J) = sprintf "= %s" S where (S,_,_) = get EVAL!(I,J); ! = qt TABLE "text" (I,J) otherwise; sel_cvals (I0,J0;I1,J1;I2,J2) = [[sel_cval (I,J) : J in [J1..J2]] : I in [I1..I2]]; --- 1405,1409 ---- sel_val (I,J) = sprintf "= %s" S where (S,_,_) = get EVAL!(I,J); ! = sel_cval (I,J) otherwise; sel_cvals (I0,J0;I1,J1;I2,J2) = [[sel_cval (I,J) : J in [J1..J2]] : I in [I1..I2]]; *************** *** 1518,1522 **** statusmsg "Done" where KEYS = keys (get CELLS), ! D = hdict (zip KEYS (map (qt TABLE "text") KEYS)), (KEYS,VALS) = unzip (list (get EVAL)), VALS = map (sprintf "= %s".fst) VALS, --- 1519,1523 ---- statusmsg "Done" where KEYS = keys (get CELLS), ! D = hdict (zip KEYS (map sel_cval KEYS)), (KEYS,VALS) = unzip (list (get EVAL)), VALS = map (sprintf "= %s".fst) VALS, *************** *** 2092,2096 **** where [L0|UL] = get UNDO_LIST if not null L ! where L = undo_cellvals L; undo_cellvals (I,J) --- 2093,2097 ---- where [L0|UL] = get UNDO_LIST if not null L ! where L = filter (neg is_gui_elem.fst) $ undo_cellvals L; undo_cellvals (I,J) |