Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
89f17786
Commit
89f17786
authored
9 years ago
by
Harry Jeffery
Browse files
Options
Downloads
Plain Diff
Merge pull request #721 from mantidproject/feature/11709_Lineviewer_handles
Feature/11709 lineviewer handles
parents
b02a1a06
df466b78
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/Mantid/MantidQt/SliceViewer/src/LineOverlay.cpp
+15
-4
15 additions, 4 deletions
Code/Mantid/MantidQt/SliceViewer/src/LineOverlay.cpp
with
15 additions
and
4 deletions
Code/Mantid/MantidQt/SliceViewer/src/LineOverlay.cpp
+
15
−
4
View file @
89f17786
...
...
@@ -387,10 +387,21 @@ namespace SliceViewer
double
distance
=
fabs
(
diff
.
x
()
*
(
current
.
y
()
-
pixA
.
y
())
-
(
current
.
x
()
-
pixA
.
x
())
*
diff
.
y
()
)
/
sqrt
(
diff
.
x
()
*
diff
.
x
()
+
diff
.
y
()
*
diff
.
y
());
// Margin of 6 pixels, and must be between the 2 limits
return
((
distance
<
7
)
&&
isBetween
(
current
.
x
(),
pixA
.
x
(),
pixB
.
x
())
&&
isBetween
(
current
.
y
(),
pixA
.
y
(),
pixB
.
y
())
);
// Margin of 6 pixels, and must be between the 2 limits (if the limits are not the same)
bool
retval
=
false
;
if
(
distance
<
7
)
{
retval
=
true
;
if
((
pixA
.
x
()
!=
pixB
.
x
())
&&
(
!
isBetween
(
current
.
x
(),
pixA
.
x
(),
pixB
.
x
())))
{
retval
=
false
;
}
if
((
pixA
.
y
()
!=
pixB
.
y
())
&&
(
!
isBetween
(
current
.
y
(),
pixA
.
y
(),
pixB
.
y
())))
{
retval
=
false
;
}
}
return
retval
;
}
//-----------------------------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment