[evince] libview: Fix a crash when selecting more than one page
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] libview: Fix a crash when selecting more than one page
- Date: Mon, 24 Jun 2013 06:44:50 +0000 (UTC)
commit e6fd3ffbef88e242111978c051565a245be08b4c
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Mon Jun 24 08:43:16 2013 +0200
libview: Fix a crash when selecting more than one page
https://bugzilla.gnome.org/show_bug.cgi?id=702874
libview/ev-view.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/libview/ev-view.c b/libview/ev-view.c
index e84b888..9ea049c 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -7136,10 +7136,13 @@ compute_new_selection_text (EvView *view,
else
point = stop;
- if (i == first)
+ if (i == first) {
_ev_view_transform_view_point_to_doc_point (view, point, &page_area,
&selection->rect.x1,
&selection->rect.y1);
+ selection->rect.x1 -= border.left;
+ selection->rect.y1 -= border.top;
+ }
/* If the selection is contained within just one page,
* make sure we don't write 'start' into both points
@@ -7147,15 +7150,13 @@ compute_new_selection_text (EvView *view,
if (first == last)
point = stop;
- if (i == last)
+ if (i == last) {
_ev_view_transform_view_point_to_doc_point (view, point, &page_area,
&selection->rect.x2,
&selection->rect.y2);
-
- selection->rect.x1 -= border.left;
- selection->rect.y1 -= border.top;
- selection->rect.x2 -= border.right;
- selection->rect.y2 -= border.bottom;
+ selection->rect.x2 -= border.right;
+ selection->rect.y2 -= border.bottom;
+ }
list = g_list_prepend (list, selection);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]