robmcmullen / omnivore

Hex editor and debugging emulator, sponsored by the Player/Missile Podcast
Mozilla Public License 2.0
53 stars 7 forks source link

Fast page scrolling in charmap misses refreshes #165

Closed robmcmullen closed 4 years ago

robmcmullen commented 7 years ago

Holding down PageUp/Down so it get into autorepeat somehow misses some refreshes and the cursor index gets ahead of the view in the window. The grid controls are always ok, but the bitmaps get behind.

DEBUG:omnivore8bit.ui.bitviewscroller:on_char_hook! char=0, key=367, modifiers=0b0
First row: 640 index 2928
DEBUG:omnivore8bit.ui.bytegrid:refreshing! document change count=28
DEBUG:omnivore8bit.ui.bytegrid:refreshing! document change count=28
DEBUG:omnivore8bit.ui.bitviewscroller:In on_paint 23
DEBUG:omnivore8bit.ui.bitviewscroller:x, y, w, h, start, num: [0, 10433, 61, 522, 10433, 105]
DEBUG:omnivore8bit.ui.bitviewscroller:get_image: bit image: rows=10433:10537, cols=0:12, viewport_byte,col=0,0
DEBUG:omnivore8bit.ui.bitviewscroller:In on_paint 23
DEBUG:omnivore8bit.ui.bitviewscroller:fontmap: x, y, w, h, row start, num: [0, 640, 279, 522, 640, 33, 'col start, num:', 0, 18]
DEBUG:omnivore8bit.ui.bitviewscroller:get_image: fontmap: start=640, num=33
Draw cursor: 2928 658 640 32
DEBUG:omnivore8bit.ui.bitviewscroller:on_char_hook! char=0, key=367, modifiers=0b0
DEBUG:omnivore8bit.ui.bitviewscroller:on_char_hook! char=0, key=367, modifiers=0b0
First row: 672 index 2b28
DEBUG:omnivore8bit.ui.bytegrid:refreshing! document change count=29
DEBUG:omnivore8bit.ui.bytegrid:refreshing! document change count=29
First row: 672 index 2d28
DEBUG:omnivore8bit.ui.bytegrid:refreshing! document change count=30
DEBUG:omnivore8bit.ui.bytegrid:refreshing! document change count=30
DEBUG:omnivore8bit.ui.bitviewscroller:In on_paint 24
DEBUG:omnivore8bit.ui.bitviewscroller:x, y, w, h, start, num: [0, 11457, 61, 522, 11457, 105]
DEBUG:omnivore8bit.ui.bitviewscroller:get_image: bit image: rows=11457:11561, cols=0:12, viewport_byte,col=0,0
DEBUG:omnivore8bit.ui.bitviewscroller:In on_paint 24
DEBUG:omnivore8bit.ui.bitviewscroller:fontmap: x, y, w, h, row start, num: [0, 672, 279, 522, 672, 33, 'col start, num:', 0, 18]
DEBUG:omnivore8bit.ui.bitviewscroller:get_image: fontmap: start=672, num=33
Draw cursor: 2d28 722 672 32
DEBUG:omnivore8bit.ui.bitviewscroller:on_char_hook! char=0, key=367, modifiers=0b0

I think the multiple on_char events that show up are the problem; the scroll position gets out of sync so what it thinks is the first row isn't updated.

robmcmullen commented 7 years ago

On windows this shows up virtually all the time, but provides a clue. Every other window other than the one with the focus is updated correctly.

robmcmullen commented 4 years ago

Not using wx grid control any more!