mbDragDrawn is always false when queried

Change-Id: Ie8eda3465381eeed62d3271040c1697ef8f6559a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145395
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index 63c8ea790..0d27a80 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -77,13 +77,11 @@ private:

    BitmapEx  maPreviewBitmapEx;
    tools::Rectangle maPreviewRect;
    Point     maLastUL, maLastBR;
    Point     maTopLeft, maBottomRight;
    Point     maMinTopLeft, maMaxBottomRight;
    SaneDlg*  mpParentDialog;
    DragDirection meDragDirection;
    bool      mbDragEnable;
    bool      mbDragDrawn;
    bool      mbIsDragging;

public:
@@ -92,7 +90,6 @@ public:
        , mpParentDialog(nullptr)
        , meDragDirection(TopLeft)
        , mbDragEnable(false)
        , mbDragDrawn(false)
        , mbIsDragging(false)
    {
    }
@@ -924,7 +921,6 @@ void ScanPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
    // check for sane values
    rRenderContext.DrawBitmapEx(maPreviewRect.TopLeft(), maPreviewRect.GetSize(), maPreviewBitmapEx);

    mbDragDrawn = false;
    DrawDrag(rRenderContext);
}

@@ -1189,14 +1185,8 @@ void ScanPreview::DrawDrag(vcl::RenderContext& rRenderContext)
    rRenderContext.SetRasterOp(RasterOp::Invert);
    rRenderContext.SetMapMode(MapMode(MapUnit::MapPixel));

    if (mbDragDrawn)
        DrawRectangles(rRenderContext, maLastUL, maLastBR);

    maLastUL = maTopLeft;
    maLastBR = maBottomRight;
    DrawRectangles(rRenderContext, maTopLeft, maBottomRight);

    mbDragDrawn = true;
    rRenderContext.SetRasterOp(eROP);
    rRenderContext.SetMapMode(MapMode(MapUnit::MapAppFont));
}