[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kimageshop
Subject: koffice/krita/plugins/paintops/defaultpaintops/duplicate
From: Cyrille Berger <cyb () lepi ! org>
Date: 2009-04-26 16:02:06
Message-ID: 1240761726.484475.9756.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 959589 by berger:
Fix: crash when selecting "correct perspective" in the duplicate paint op.
Need review for backport in branch.
CCMAIL:kimageshop@kde.org
M +5 -4 kis_duplicateop.cpp
M +0 -1 kis_duplicateop.h
--- trunk/koffice/krita/plugins/paintops/defaultpaintops/duplicate/kis_duplicateop.cpp \
#959588:959589 @@ -159,13 +159,14 @@
// Perspective correction ?
KisPainter copyPainter(m_srcdev);
- if (settings->perspectiveCorrection()) {
+ KisImageSP image = settings->m_image;
+ if (settings->perspectiveCorrection() && image && \
image->perspectiveGrid()->countSubGrids() == 1) { Matrix3qreal startM = \
Matrix3qreal::Identity(); Matrix3qreal endM = Matrix3qreal::Identity();
// First look for the grid corresponding to the start point
- KisSubPerspectiveGrid* subGridStart = *m_image->perspectiveGrid()->begin();
- QRect r = QRect(0, 0, m_image->width(), m_image->height());
+ KisSubPerspectiveGrid* subGridStart = *image->perspectiveGrid()->begin();
+ QRect r = QRect(0, 0, image->width(), image->height());
#if 1
if (subGridStart) {
@@ -174,7 +175,7 @@
#endif
#if 1
// Second look for the grid corresponding to the end point
- KisSubPerspectiveGrid* subGridEnd = *m_image->perspectiveGrid()->begin();
+ KisSubPerspectiveGrid* subGridEnd = *image->perspectiveGrid()->begin();
if (subGridEnd) {
endM = KisPerspectiveMath::computeMatrixTransfoToPerspective(*subGridEnd->topLeft(), \
*subGridEnd->topRight(), *subGridEnd->bottomLeft(), *subGridEnd->bottomRight(), r); \
}
--- trunk/koffice/krita/plugins/paintops/defaultpaintops/duplicate/kis_duplicateop.h \
#959588:959589 @@ -60,7 +60,6 @@
const KisDuplicateOpSettings * settings;
KisPaintDeviceSP m_srcdev;
KisPaintDeviceSP m_target;
- KisImageSP m_image;
QPointF m_duplicateStart;
bool m_duplicateStartIsSet;
_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic