Opened 14 years ago
Closed 14 years ago
#7035 closed bug (fixed)
BPictureButton Archiving is broken
Reported by: | MrSunshine | Owned by: | stippi |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | User Interface | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
Was tinkering with BPictureButton archiving, and it seems that the archiving code is wrong.
when archiving using the disabled buttons pictures also all of the underlaying pictures gets a copy of the pictures above them
so _e_on will be fine,
_e_off will first have _e_on's data then _e_off data,
_d_on will have _e_on, _e_off, _d_on
_d_off will have _e_on, _e_off, _d_on, _d_off data
this results in after archiving and unarchiving a BPictureButton, allt he button states will have the picture of _e_on
http://haiku.it.su.se:8180/source/xref/src/kits/interface/PictureButton.cpp#82
here you might see what i mean, the pictureArchive is never cleared between the adds, so each AddMessage to it will just add another message, then there will be two, three, four messages and each time they are ALL added to the archive.
i hope i explained clearly enough what is happening here =)
Change History (5)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
You're definitely right. pictureButton needs to be emptied after every AddMessage() call.
Just like i thought, adding a archivedPicture.MakeEmpty() between each of the buttons and it works flawlessly =) tho my fix might not be as you guys want it =)