dabo Commit
Revision 7095
Date: 2012-02-13 07:42:49 -0800 (Mon, 13 Feb 2012)
Author: Ed
Trac: http://trac.dabodev.com/changeset/7095

Changed:
U   trunk/dabo/ui/uiwx/dPageFrameMixin.py

Log:
Added code to preserve the imgKey attribute when making changes to a page.

Diff:
Modified: trunk/dabo/ui/uiwx/dPageFrameMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dPageFrameMixin.py       2012-02-13 15:41:59 UTC (rev 
7094)
+++ trunk/dabo/ui/uiwx/dPageFrameMixin.py       2012-02-13 15:42:49 UTC (rev 
7095)
@@ -151,6 +151,7 @@
                                        self.addImage(imgKey)
                                        imgIdx = self._imageList[imgKey]
                        self.SetPageImage(pgIdx, imgIdx)
+                       self.Pages[pgIdx].imgKey = imgKey
 
 
        def getPageImage(self, pg):
@@ -224,6 +225,7 @@
                        self.InsertPage(pos, pg, text=caption, select=False, 
imageId=idx)
                else:
                        self.InsertPage(pos, pg, text=caption, select=False)
+               self.Pages[pos].imgKey = imgKey
                self.layout()
                insertedPage = self.Pages[pos]
                insertedPage.Caption = caption
@@ -276,7 +278,7 @@
                        return
                cap = pg.Caption
                self.RemovePage(pos)
-               self.InsertPage(newPos, pg, cap)
+               self.insertPage(newPos, pg, caption=cap, imgKey=pg.imgKey)
                if selecting:
                        self.SelectedPage = pg
                self.Parent.unlockDisplay()



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to