Opened 9 years ago

Closed 9 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


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

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 MrSunshine, 9 years ago

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 =)

comment:2 by jackburton, 9 years ago

You're definitely right. pictureArchive needs to be emptied after every AddMessage() call.

Last edited 9 years ago by jackburton (previous) (diff)

comment:3 by jackburton, 9 years ago

Should be fixed in hrev39981. Please check.

comment:4 by MrSunshine, 9 years ago

Exacly like ive done it in my haiku source and it works fine =)

comment:5 by jackburton, 9 years ago

Resolution: fixed
Status: newclosed

Let's close it, then.

Note: See TracTickets for help on using tickets.