[haiku-bugs] [Haiku] #7035: BPictureButton Archiving is broken

  • From: "MrSunshine" <trac@xxxxxxxxxxxx>
  • Date: Mon, 27 Dec 2010 16:02:01 -0000

#7035: BPictureButton Archiving is broken
------------------------------+-----------------------------
   Reporter:  MrSunshine      |       Owner:  stippi
       Type:  bug             |      Status:  new
   Priority:  normal          |   Milestone:  R1
  Component:  User Interface  |     Version:  R1/Development
   Keywords:                  |  Blocked By:
Has a Patch:  0               |    Platform:  All
   Blocking:                  |
------------------------------+-----------------------------
 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 =)

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/7035>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: