From 14560264becc0b334f06f7af62c61c77809d4eda Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 11 Jun 2014 15:07:44 +0100 Subject: Reset preview boundaries on a new scanner Change-Id: Id2830727216fa25ca5935406a74f4237276d56db --- extensions/source/scanner/sanedlg.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'extensions') diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index af45214fa1a1..dfc232427a59 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(); } } -- cgit