forked from openlp/openlp
Fix row counts and bad code before superfly spots it
This commit is contained in:
parent
161f7e88bb
commit
f158044d5e
@ -460,17 +460,17 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.serviceItem = serviceItem
|
self.serviceItem = serviceItem
|
||||||
self.PreviewListWidget.clear()
|
self.PreviewListWidget.clear()
|
||||||
self.PreviewListWidget.setRowCount(0)
|
self.PreviewListWidget.setRowCount(0)
|
||||||
self.PreviewListWidget.setColumnWidth(1, self.labelWidth)
|
self.PreviewListWidget.setColumnWidth(0, self.labelWidth)
|
||||||
self.PreviewListWidget.setColumnWidth(1, width - self.labelWidth)
|
self.PreviewListWidget.setColumnWidth(1, width - self.labelWidth)
|
||||||
if self.isLive:
|
if self.isLive:
|
||||||
self.SongMenu.menu().clear()
|
self.SongMenu.menu().clear()
|
||||||
|
row = 0
|
||||||
for framenumber, frame in enumerate(self.serviceItem.get_frames()):
|
for framenumber, frame in enumerate(self.serviceItem.get_frames()):
|
||||||
self.PreviewListWidget.setRowCount(
|
self.PreviewListWidget.setRowCount(
|
||||||
self.PreviewListWidget.rowCount() + 1)
|
self.PreviewListWidget.rowCount() + 1)
|
||||||
rowitem = QtGui.QTableWidgetItem()
|
rowitem = QtGui.QTableWidgetItem()
|
||||||
item = QtGui.QTableWidgetItem()
|
item = QtGui.QTableWidgetItem()
|
||||||
slide_height = 0
|
slide_height = 0
|
||||||
row = u''
|
|
||||||
#It is a based Text Render
|
#It is a based Text Render
|
||||||
if self.serviceItem.is_text():
|
if self.serviceItem.is_text():
|
||||||
if self.isLive and frame[u'verseTag'] is not None:
|
if self.isLive and frame[u'verseTag'] is not None:
|
||||||
@ -484,12 +484,12 @@ class SlideController(QtGui.QWidget):
|
|||||||
else:
|
else:
|
||||||
tag = bits[0]
|
tag = bits[0]
|
||||||
row = bits[0][0:1]
|
row = bits[0][0:1]
|
||||||
try:
|
if tag not in self.slideList:
|
||||||
test = self.slideList[tag]
|
|
||||||
except:
|
|
||||||
self.slideList[tag] = framenumber
|
self.slideList[tag] = framenumber
|
||||||
self.SongMenu.menu().addAction(self.trUtf8(u'%s'%tag),
|
self.SongMenu.menu().addAction(self.trUtf8(u'%s'%tag),
|
||||||
self.onSongBarHandler)
|
self.onSongBarHandler)
|
||||||
|
else:
|
||||||
|
row += 1
|
||||||
item.setText(frame[u'text'])
|
item.setText(frame[u'text'])
|
||||||
else:
|
else:
|
||||||
label = QtGui.QLabel()
|
label = QtGui.QLabel()
|
||||||
@ -501,7 +501,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
label.setPixmap(QtGui.QPixmap.fromImage(pixmap))
|
label.setPixmap(QtGui.QPixmap.fromImage(pixmap))
|
||||||
self.PreviewListWidget.setCellWidget(framenumber, 1, label)
|
self.PreviewListWidget.setCellWidget(framenumber, 1, label)
|
||||||
slide_height = width * self.parent.RenderManager.screen_ratio
|
slide_height = width * self.parent.RenderManager.screen_ratio
|
||||||
rowitem.setText(row)
|
rowitem.setText(unicode(row))
|
||||||
self.PreviewListWidget.setItem(framenumber, 0, rowitem)
|
self.PreviewListWidget.setItem(framenumber, 0, rowitem)
|
||||||
self.PreviewListWidget.setItem(framenumber, 1, item)
|
self.PreviewListWidget.setItem(framenumber, 1, item)
|
||||||
if slide_height != 0:
|
if slide_height != 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user