[Libreoffice-commits] core.git: extensions/source
Caolán McNamara
caolanm at redhat.com
Wed Jun 11 07:08:27 PDT 2014
extensions/source/scanner/sanedlg.cxx | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit 14560264becc0b334f06f7af62c61c77809d4eda
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jun 11 15:07:44 2014 +0100
Reset preview boundaries on a new scanner
Change-Id: Id2830727216fa25ca5935406a74f4237276d56db
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index af45214..dfc2324 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -71,6 +71,13 @@ public:
{
mpParentDialog = pParent;
}
+ void ResetForNewScanner()
+ {
+ maTopLeft = Point();
+ maBottomRight = Point();
+ maMinTopLeft = Point();
+ maMaxBottomRight = Point(PREVIEW_WIDTH, PREVIEW_HEIGHT);
+ }
void EnableDrag() { mbDragEnable = true; }
void DisableDrag() { mbDragEnable = false; }
bool IsDragEnabled() { return mbDragEnable; }
@@ -603,6 +610,7 @@ IMPL_LINK( SaneDlg, SelectHdl, ListBox*, pListBox )
{
mrSane.Close();
mrSane.Open(nNewNumber);
+ mpPreview->ResetForNewScanner();
InitFields();
}
}
More information about the Libreoffice-commits
mailing list