Fixed Resolution Change in preview. Removed debugging print statements.

This commit is contained in:
DH4 2017-05-28 07:36:34 -05:00
parent 75c1c65c9d
commit d9a5f2dd34
2 changed files with 4 additions and 7 deletions

View File

@ -299,7 +299,7 @@ class Main(QtCore.QObject):
res = self.resolutions[resIndex].split('x')
self.settings.setValue('outputWidth',res[0])
self.settings.setValue('outputHeight',res[1])
self.drawPreview
self.drawPreview()
def drawPreview(self):
#self.settings.setValue('visLayout', self.window.comboBox_visLayout.currentIndex())
@ -350,7 +350,6 @@ class Main(QtCore.QObject):
self.window.stackedWidget.removeWidget(self.pages[index])
self.window.listWidget_componentList.takeItem(index)
self.selectedComponents.pop(index)
print(self.selectedComponents)
self.drawPreview()
def changeComponentWidget(self):

View File

@ -28,7 +28,6 @@ class Worker(QtCore.QObject):
"backgroundImage": backgroundImage,
"components": components,
}
print(components)
self.queue.put(dic)
@pyqtSlot()
@ -51,16 +50,15 @@ class Worker(QtCore.QObject):
bgImage = bgImage[0]
im = self.core.drawBaseImage(bgImage)
frame = Image.new("RGBA", (1280, 720),(0,0,0,255))
width = int(self.core.settings.value('outputWidth'))
height = int(self.core.settings.value('outputHeight'))
frame = Image.new("RGBA", (width, height),(0,0,0,255))
frame.paste(im)
componentWidgets = [self.stackedWidget.widget(i) for i in range(self.stackedWidget.count())]
components = nextPreviewInformation["components"]
print(components)
print(componentWidgets)
for component, componentWidget in zip(components, componentWidgets):
print('drawing')
newFrame = Image.alpha_composite(frame,component.previewRender(self, componentWidget))
frame = Image.alpha_composite(frame,newFrame)