|
|
@@ -85,7 +85,9 @@ class ImageFitter(DockWidget):
|
|
|
if layer.type() == 'paintlayer':
|
|
|
self.fitImage(layer)
|
|
|
didNotRun = False
|
|
|
-
|
|
|
+ if layer.type() == 'vectorlayer' and not self.scalingCheck.isChecked():
|
|
|
+ self.fitImage(layer)
|
|
|
+ didNotRun = False
|
|
|
if didNotRun:
|
|
|
dialog = QDialog()
|
|
|
dialog.setWindowTitle("Paint Layer Required")
|
|
|
@@ -108,14 +110,14 @@ class ImageFitter(DockWidget):
|
|
|
|
|
|
# Handle Scaling. Don't scale if not needed.
|
|
|
# Repeated scaling does weird things to images.
|
|
|
- if self.scalingCheck.checkState():
|
|
|
+ if self.scalingCheck.isChecked():
|
|
|
doScaling = False
|
|
|
targetWidth = tbds['right'] - 1 - tbds['left']
|
|
|
targetHeight = tbds['bottom'] - 1 - tbds['top']
|
|
|
layerWidth = bds.right() - bds.left()
|
|
|
layerHeight = bds.bottom() - bds.top()
|
|
|
# Deal with aspect ratio. Simply adjust target dimensions.
|
|
|
- if self.aspectCheck.checkState():
|
|
|
+ if self.aspectCheck.isChecked():
|
|
|
aspectRatio = layerWidth / layerHeight
|
|
|
mode = self.matchMode.currentIndex()
|
|
|
if mode == 0: # fit horizontally
|