[q-lang-cvs] qcalc qcalc.q,1.105,1.106
Brought to you by:
agraef
From: Albert G. <ag...@us...> - 2007-11-07 09:24:51
|
Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9029 Modified Files: qcalc.q Log Message: fix some of the problems with vanishing GUI elements Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.105 retrieving revision 1.106 diff -C2 -d -r1.105 -r1.106 *** qcalc.q 7 Nov 2007 08:17:18 -0000 1.105 --- qcalc.q 7 Nov 2007 09:24:48 -0000 1.106 *************** *** 427,430 **** --- 427,431 ---- chk (I,J) = printf "warning: overwriting GUI object %s at %s\n" (str X,str (I,J)) + if not is_nil X where X:QtObject = get CELLS!(I,J); *************** *** 573,579 **** recursive X = REDIT := true || X || REDIT := false; ! /* XXXFIXME: Yet another horrible kludge to set the current cell to the one ! which holds one of our GUI elements if it gets the focus. Unfortunately, ! this isn't handled automatically by Qt. */ check_focus N X = qt TABLE "setCurrentCell" (I,J) || --- 574,580 ---- recursive X = REDIT := true || X || REDIT := false; ! /* XXXFIXME: A horrible kludge to set the current cell to the one which holds ! one of our GUI elements if it gets the focus. Unfortunately, this isn't ! handled automatically by Qt. */ check_focus N X = qt TABLE "setCurrentCell" (I,J) || *************** *** 587,590 **** --- 588,601 ---- if N < 5; + /* FIXME: And yet another desperate kludge. For some reasons I don't + understand, Qt sometimes "looses" the cell widgets created with + doprocess. We make up for that by just running doprocess again. */ + + def LASTW = ref []; + + check_lastW (I,J,X:QtObject) + = doprocess (I,J) + if is_nil (qt TABLE "cellWidget" (I,J)); + /* Timer processing. */ *************** *** 597,601 **** set_status HAVE_UNDO EDIT_UNDO || set_status HAVE_REDO EDIT_REDO || ! check_focus 0 (qt APP "focusWidget" ()) || digest_loop where HAVE_TABLE = (qt TABW "currentPageIndex" () = 0), --- 608,614 ---- set_status HAVE_UNDO EDIT_UNDO || set_status HAVE_REDO EDIT_REDO || ! do check_lastW (get LASTW) || LASTW := [] || ! check_focus 0 (qt APP "focusWidget" ()) || ! digest_loop where HAVE_TABLE = (qt TABW "currentPageIndex" () = 0), *************** *** 646,650 **** digest "+++ Exiting." = STATE := 0; ! digest W:List = process_sel2 W || merge_undo $ map (flip (flip sub 0) 1) W if get STATE = 4; digest S:String = /* The program generated output before we got the "Ready" --- 659,664 ---- digest "+++ Exiting." = STATE := 0; ! digest W:List = process_sel2 W || merge_undo $ map (flip (flip sub 0) 1) W || ! LASTW := filter (is_qt_object.trd) W if get STATE = 4; digest S:String = /* The program generated output before we got the "Ready" |