Phil, 1-05-2012 Short Description: Fix to new 6.2 "out of order typing" in slot incell edits Bug Number: 5148 Release notes (y/n): no (new problem in 6.2 development). For Release Nums: 6.2 Gnats 5148: Typing values in slots lead to out of order numbers. Notes: https://cadswes2.colorado.edu/~philw/2012/bugs/5148/ This is a recurrence of some difficulty we've had with the implementation of special behavior originally requested as Gnats 4833 ('Inline editing of slot values hides significant digits'). The problem we're seeing again had been addressed as Gnats 4953 ('Typing numbers in slots is behaving incorrectly') [15 months ago]. Apparently something has broken this since (after) the recent 6.1 release (in 6.2 development, as David noted) -- possibly some Qt4 porting work. I have yet to figure out what changed in code which caused this to break. [We are still using the same version of Qt as when 4953 was addressed: Qt 4.6.3]. And it doesn't seem to be related to a Qt port. I still want to briefly look into what caused this. But a fundamentally correct fix has been applied. As apparent from a debug trace (see below), when an edit session is started by just typing in the "current cell", the QLineEdit DOES receive the QKeyPress event for that initial keystroke BEFORE receiving the intial QShowEvent. So, at the time of scheduling the "special" (Gnats 4833) change in cursor position, we CAN discern whether or not the incell edit was started by an initial keystroke. The following code change addresses this problem (in a fundamentally "correct" way): void RwCellQLineEdit::showEvent (QShowEvent* evt) OLD: if (_showCount == 1) { schedEditStartFixupTimer(); } NEW: if ((_showCount == 1) && (_keyPressCount == 0)) { schedEditStartFixupTimer(); } Here is an excerpt of a debug trace (without this change, as a result of typing "123" into the current cell before an incell edit has already started) which demonstrates why this is a direct fix. Line 08 shows the bug; see the effect in line 18, before the 2nd keypress (line 23). 00: RwCellQLineEdit ctor-a [#13] 01: RwCellQLineEdit::event ShortcutOverride 02: RwCellQLineEdit::event KeyPress 03: RwCellQLineEdit::keyPressEvent [#13] Cnt: 1 '1' (49) Hex (31) 04: RwCellQLineEdit::event Polish 05: RwCellQLineEdit::event Move 06: RwCellQLineEdit::event Resize 07: RwCellQLineEdit::event Show 08: RwCellQLineEdit::schedEditStartFixupTimer 09: RwCellQLineEdit::event ChildAdded 10: RwCellQLineEdit::event ShowToParent 11: RwCellQLineEdit::event FocusIn 12: RwCellQLineEdit::event ChildInsertedRequest 13: RwCellQLineEdit::event ChildInserted 14: RwCellQLineEdit::event PolishRequest 15: RwCellQLineEdit::event Paint 16: RwCellQLineEdit::event Enter 17: RwCellQLineEdit::event MouseMove 18: RwCellQLineEdit::editStartFixup 19: RwCellQLineEdit::event Paint 20: RwCellQLineEdit::event KeyRelease 21: RwCellQLineEdit::event ShortcutOverride 22: RwCellQLineEdit::event KeyPress 23: RwCellQLineEdit::keyPressEvent [#13] Cnt: 2 '2' (50) Hex (32) 24: RwCellQLineEdit::cancelEditStartFixupTimer ... --