diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-06-11 15:07:44 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-11 15:07:44 +0100 |
commit | 14560264becc0b334f06f7af62c61c77809d4eda (patch) | |
tree | ead05e195106ca506f80a0505accfdf0088820ff /extensions | |
parent | ab713ba1ffd00952ef8957f9b524e4e44f382f13 (diff) |
Reset preview boundaries on a new scanner
Change-Id: Id2830727216fa25ca5935406a74f4237276d56db
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/scanner/sanedlg.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
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(); } } |