more changes and fixes

This commit is contained in:
Tim Bentley 2009-05-22 20:36:16 +01:00
parent 8acc980ce4
commit d0bcc06d35
3 changed files with 7 additions and 3 deletions

View File

@ -202,6 +202,7 @@ class Renderer:
bboxes = []
for line in lines:
bboxes.append(self._render_single_line(line, footer))
print line, bboxes
numlines = len(lines)
bottom = self._rect.bottom()
@ -214,6 +215,8 @@ class Renderer:
by = 0
for (x, y) in bboxes[startline:endline]:
by += y
print by
print by , bottom
if by > bottom:
good=0
break
@ -221,6 +224,7 @@ class Renderer:
endline = startline+ratio
# if good == 1:
# break
print "---------"
retval = []
numlines_per_page = ratio

View File

@ -204,7 +204,7 @@ class BibleMediaItem(MediaManagerItem):
self.BibleListView.setAlternatingRowColors(True)
self.BibleListData = TextListData()
self.BibleListView.setModel(self.BibleListData)
self.BibleListView.setSelectionMode(QtGui.QAbstractItemView.MultiSelection)
self.BibleListView.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
self.BibleListView.setDragEnabled(True)
self.PageLayout.addWidget(self.BibleListView)

View File

@ -89,7 +89,7 @@ class ListWithPreviews(QtCore.QAbstractListModel):
else:
retval = QtCore.QVariant()
if type(retval) is not type(QtCore.QVariant):
return QVariant(retval)
return QtCore.QVariant(retval)
else:
return retval