Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Okular
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Joao Oliveira
Okular
Commits
1ef69293
Commit
1ef69293
authored
Dec 16, 2012
by
Albert Astals Cid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't ignore mouse movements on the annotator when not on the locked item
REVIEW: 107726 BUGS: 310572
parent
7333dd14
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
ui/pageviewannotator.cpp
ui/pageviewannotator.cpp
+13
-14
No files found.
ui/pageviewannotator.cpp
View file @
1ef69293
...
...
@@ -733,25 +733,26 @@ QRect PageViewAnnotator::performRouteMouseOrTabletEvent(const AnnotatorEngine::E
return
QRect
();
}
// find out normalized mouse coords inside current item
const
QRect
&
itemRect
=
item
->
uncroppedGeometry
();
const
QPointF
eventPos
=
m_pageView
->
contentAreaPoint
(
pos
);
double
nX
=
item
->
absToPageX
(
eventPos
.
x
()
);
double
nY
=
item
->
absToPageY
(
eventPos
.
y
()
);
QRect
modifiedRect
;
// 1. lock engine to current item
if
(
m_lockedItem
&&
item
!=
m_lockedItem
)
return
QRect
();
if
(
!
m_lockedItem
&&
eventType
==
AnnotatorEngine
::
Press
)
{
m_lockedItem
=
item
;
m_engine
->
setItem
(
m_lockedItem
);
}
if
(
!
m_lockedItem
)
{
return
QRect
();
}
// find out normalized mouse coords inside current item
const
QRect
&
itemRect
=
m_lockedItem
->
uncroppedGeometry
();
const
QPointF
eventPos
=
m_pageView
->
contentAreaPoint
(
pos
);
double
nX
=
m_lockedItem
->
absToPageX
(
eventPos
.
x
()
);
double
nY
=
m_lockedItem
->
absToPageY
(
eventPos
.
y
()
);
QRect
modifiedRect
;
// 2. use engine to perform operations
const
QRect
paintRect
=
m_engine
->
event
(
eventType
,
button
,
nX
,
nY
,
itemRect
.
width
(),
itemRect
.
height
(),
i
tem
->
page
()
);
const
QRect
paintRect
=
m_engine
->
event
(
eventType
,
button
,
nX
,
nY
,
itemRect
.
width
(),
itemRect
.
height
(),
m_lockedI
tem
->
page
()
);
// 3. update absolute extents rect and send paint event(s)
if
(
paintRect
.
isValid
()
)
...
...
@@ -784,7 +785,7 @@ QRect PageViewAnnotator::performRouteMouseOrTabletEvent(const AnnotatorEngine::E
m_document
->
addPageAnnotation
(
m_lockedItem
->
pageNumber
(),
annotation
);
if
(
annotation
->
openDialogAfterCreation
()
)
m_pageView
->
openAnnotationWindow
(
annotation
,
i
tem
->
pageNumber
()
);
m_pageView
->
openAnnotationWindow
(
annotation
,
m_lockedI
tem
->
pageNumber
()
);
}
if
(
m_continuousMode
)
...
...
@@ -798,8 +799,6 @@ QRect PageViewAnnotator::performRouteMouseOrTabletEvent(const AnnotatorEngine::E
QRect
PageViewAnnotator
::
routeMouseEvent
(
QMouseEvent
*
e
,
PageViewItem
*
item
)
{
if
(
!
item
)
return
QRect
();
AnnotatorEngine
::
EventType
eventType
;
AnnotatorEngine
::
Button
button
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment