def createGraphicPanel(self, slide): """ Create the graphic panel for the slide if necessary and select it. There cannot be 2 graphic panels for the same slide """ gp = GraphicPanel(self) gp.setSlide(slide) self.__book.AddPage(gp, slide.get_name()) return gp
def createGraphicPanel(self,slide): """ Create the graphic panel for the slide if necessary and select it. There cannot be 2 graphic panels for the same slide """ ss = self.getGraphicSlides() if not slide in ss: gp = GraphicPanel(self) gp.setSlide(slide) self.__book.AddPage(gp, slide.get_name()) idx = self.__book.GetPageCount()-1 else: idx = ss.index(slide) gp = self.getGraphicPanels()[idx] self.__book.SetSelection(idx) return gp