src/imageprocessor.cpp
// check if the points were moved
check if the points were moved
check if the points were moved
foreach(QVariant corner, cropPoints) {
        QString key = cropPoints.key(corner);
        QPointF point = corner.toPointF();
        points.insert(key, point);
        int w = img.width() - 1;
        int h = img.height() - 1;
        if(key == "topLeft") {
            if (point.x() > 1 || point.y() > 1) {
                cropNeeded = true;
            }
        }
        if(key == "topRight") {
            if (point.x() < w || point.y() > 1) {
                cropNeeded = true;
            }
        }
        if(key == "bottomRight") {
            if (point.x() < w || point.y() < h ) {
                cropNeeded = true;
            }
        }
        if(key == "bottomLeft") {
            if (point.x() > 1 || point.y() < h) {
                cropNeeded = true;
            }
        }
    }
foreach ( QVariant corner , cropPoints ) { QString key = cropPoints . key ( corner ) ; QPointF point = corner . toPointF ( ) ; points . insert ( key , point ) ; int w = img . width ( ) - 1 ; int h = img . height ( ) - 1 ; if ( key == " " ) { if ( point . x ( ) > 1 || point . y ( ) > 1 ) { cropNeeded = true ; } } if ( key == " " ) { if ( point . x ( ) < w || point . y ( ) > 1 ) { cropNeeded = true ; } } if ( key == " " ) { if ( point . x ( ) < w || point . y ( ) < h ) { cropNeeded = true ; } } if ( key == " " ) { if ( point . x ( ) > 1 || point . y ( ) < h ) { cropNeeded = true ; } } }
check if the points were moved
check if the points were moved