After the results of a segmentation appear, I usually click the Clear segmentation button and then the Clear doodles button to continue testing my code. The segmentation gets cleared instantly, but my doodles don't disappear when I click the Clear doodles button for the first time. I need to click the button again for a second time in order for my doodles to disappear.
As you can see in the GIF above, another encountered issue is that any subsequent doodles instantly disappear whenever I change the doodle class/label. This is similar to Sharon's issue, except my issue happens consistently.
Fix
If you use the print statements that I added (removed now) in the DoodleDrawer class, you can see that the _draw and _drawn doodle plots are updated correctly. That means something went wrong when the Application class was displaying these doodle plots. The Application class uses _img_pane to display the doodle plots, so I added the line below to update _img_pane whenever the Clear doodles button is clicked.
The DoodleDrawer class's clear_all parameter changes whenever the Clear doodles button is clicked, so making the _update_img_pane() function depend on DoodleDrawer's clear_all parameter would reassign _img_pane with the recently updated doodle plots.
Now the doodles don't disappear when I clear all the doodles and choose a new class/label. @2320sharon, when you have time can you test my branch and check if the bug still appears for you? Hope the bug doesn't happen randomly anymore.🤞🏻
Issues
After the results of a segmentation appear, I usually click the
As you can see in the GIF above, another encountered issue is that any subsequent doodles instantly disappear whenever I change the doodle class/label. This is similar to Sharon's issue, except my issue happens consistently.
Clear segmentation
button and then theClear doodles
button to continue testing my code. The segmentation gets cleared instantly, but my doodles don't disappear when I click theClear doodles
button for the first time. I need to click the button again for a second time in order for my doodles to disappear.Fix
If you use the print statements that I added (removed now) in the
DoodleDrawer
class, you can see that the_draw
and_drawn
doodle plots are updated correctly. That means something went wrong when theApplication
class was displaying these doodle plots. TheApplication
class uses_img_pane
to display the doodle plots, so I added the line below to update_img_pane
whenever theClear doodles
button is clicked.The
Now the doodles don't disappear when I clear all the doodles and choose a new class/label. @2320sharon, when you have time can you test my branch and check if the bug still appears for you? Hope the bug doesn't happen randomly anymore.🤞🏻
DoodleDrawer
class'sclear_all
parameter changes whenever theClear doodles
button is clicked, so making the_update_img_pane()
function depend onDoodleDrawer
'sclear_all
parameter would reassign_img_pane
with the recently updated doodle plots.