uci-sdcl/CalicoClient — Issue #64: Stroke disappearing but still exists
Author: waynehuang3
Created: 2012-02-10 02:55:36+00:00
State: open

So I said I wasn't going to work on this anymore till next week, but D found a bug after everyone else left today that I wanted to take a look at. A stroke gets hidden when it becomes a temp scrap. Sometimes the stroke is not becoming unhidden like it should be. There are a few instances where this happens, but here is the easiest way to duplicate it.

1. create a permanent scrap.
2. create a temp scrap.
3. Click on the permanent scrap to bring up it's bubble menu (the stroke of the temp scrap should be visible)
4. press and hold inside the stroke where the temp scrap was to make it a temp scrap again.
5. click on empty canvas

The stroke should now remain hidden, but if you press and hold the same area, it will become a temp scrap again.

It has only come to light now because of the way Bubble Menu works and smudges get deleted, but the underlying problem I believe has existed for quite a while.

When calico.controllers.CStrokeController.no_notify_delete(long) is called, it deletes the reference of the stroke from most places, EXCEPT CStrokeController.strokes. The server correctly calls CStrokeController.strokes.remove(uuid); but the client doesn't. This means when querying if a stroke exists, it will always return true.

I'm creating this issue just so everyone knows it exists and so they know I'm aware of the problem but won't be fixing it till next week.