Changeset 2697 for trunk/python/customgui_base.py
- Timestamp:
- 12/14/12 13:48:22 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/customgui_base.py
r2606 r2697 326 326 doheader = (isinstance(header['textobj'],list) and \ 327 327 len(header['textobj']) > 0) 328 if doheader: 329 top = self.plotter._plotter.figure.subplotpars.top 330 fontsize = header['textobj'][0].get_fontproperties().get_size() 328 331 if self.plotter._startrow <= 0: 329 332 msg = "The page counter is reset due to chages of plot settings. " … … 340 343 selstr = header['selstr'] 341 344 self.plotter._reset_header() 342 if doheader:343 top = self.plotter._plotter.figure.subplotpars.top344 fontsize = header['textobj'][0].get_fontproperties().get_size()345 345 346 346 self.plotter._plotter.hold() … … 349 349 #self.plotter._plotter.clear() 350 350 self.plotter._plot(self.plotter._data) 351 self.set_pagecounter(self._get_pagenum()) 351 pagenum = self._get_pagenum() 352 self.set_pagecounter(pagenum) 352 353 # Plot header information 353 if header['textobj']: 354 #if header['textobj']: 355 if doheader and pagenum == 1: 354 356 if top and top != self.plotter._margins[3]: 355 357 # work around for sdplot in CASA. complete checking in future? … … 403 405 404 406 def _get_pagenum(self): 405 maxpanel = 16406 407 # get the ID of last panel in the current page 407 408 idlastpanel = self.plotter._ipanel 408 if self.plotter._rows and self.plotter._cols: 409 ppp = self.plotter._rows*self.plotter._cols 410 else: 411 ppp = maxpanel 409 # max panels in a page 410 ppp = self.plotter._plotter.rows*self.plotter._plotter.cols 412 411 return int(idlastpanel/ppp)+1 413 412 … … 1239 1238 1240 1239 def _get_pagenum(self): 1241 maxpanel = 251242 1240 # get the ID of last panel in the current page 1243 1241 idlastpanel = self.plotter._ipanel 1244 if self.plotter._rows and self.plotter._cols: 1245 ppp = self.plotter._rows*self.plotter._cols 1246 else: 1247 ppp = maxpanel 1242 # max panels in a page 1243 ppp = self.plotter._plotter.rows*self.plotter._plotter.cols 1248 1244 return int(idlastpanel/ppp)+1 1249 1245
Note: See TracChangeset
for help on using the changeset viewer.