[q-lang-cvs] qcalc qcalc.q,1.139,1.140
Brought to you by:
agraef
|
From: Albert G. <ag...@us...> - 2007-11-13 09:56:32
|
Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv10837 Modified Files: qcalc.q Log Message: allow selection with Dissociate cells operation Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.139 retrieving revision 1.140 diff -C2 -d -r1.139 -r1.140 *** qcalc.q 13 Nov 2007 09:37:08 -0000 1.139 --- qcalc.q 13 Nov 2007 09:56:28 -0000 1.140 *************** *** 1377,1387 **** dissociate_cells _ _ _ if is_global: = set_current_cell (I,J) || qt IT "setSpan" (1,1) || save_undo (I,J;1,1) ! if not is_nil IT and then ((N>1) or else (M>1)) ! where (_,_;I,J;_,_) = check_editing || selection, ! (I,J) = real_index (I,J), (N,M) = cell_span (I,J), ! IT:QtObject = qt TABLE "item" (I,J) ! if qt TABW "currentPageIndex" () = 0; insert_row _ _ _ if is_global: --- 1377,1392 ---- dissociate_cells _ _ _ if is_global: + = do dissociate_cell SEL + where SEL = check_editing || sel_cellvals selection, + (I,J,V) = unzip3 $ cat SEL, K = zip I J, + K = map real_index K, + SEL = filter is_spanned $ keys $ hdict $ zip K V, + SEL = sort indexcmp SEL + if qt TABW "currentPageIndex" () = 0; + + dissociate_cell (I,J) = set_current_cell (I,J) || qt IT "setSpan" (1,1) || save_undo (I,J;1,1) ! where IT = get_table_item (I,J); insert_row _ _ _ if is_global: |