Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository 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
schwede
openstructure
Commits
15db5dcc
Commit
15db5dcc
authored
14 years ago
by
Marco Biasini
Browse files
Options
Downloads
Patches
Plain Diff
fix crash in sequence viewer for MacOS X and Qt versions>=4.6
parent
a80d296b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/gui/src/sequence_viewer/sequence_table_view.cc
+10
-8
10 additions, 8 deletions
modules/gui/src/sequence_viewer/sequence_table_view.cc
with
10 additions
and
8 deletions
modules/gui/src/sequence_viewer/sequence_table_view.cc
+
10
−
8
View file @
15db5dcc
...
...
@@ -227,19 +227,21 @@ QModelIndex SequenceTableView::moveCursor(CursorAction action, Qt::KeyboardModif
{
QModelIndex
current
=
QTableView
::
moveCursor
(
action
,
modifiers
);
if
(
action
==
MoveLeft
&&
current
.
column
()
>
0
&&
this
->
visualRect
(
current
).
topLeft
().
x
()
<
static_column_
->
columnWidth
(
0
)
){
const
int
new_value
=
horizontalScrollBar
()
->
value
()
+
this
->
visualRect
(
current
).
topLeft
().
x
()
-
static_column_
->
columnWidth
(
0
);
#if !(defined(__APPLE__) && (QT_VERSION>=0x040600))
if
(
action
==
MoveLeft
&&
current
.
column
()
>
0
&&
this
->
visualRect
(
current
).
topLeft
().
x
()
<
static_column_
->
columnWidth
(
0
)){
int
new_value
=
horizontalScrollBar
()
->
value
()
+
this
->
visualRect
(
current
).
topLeft
().
x
();
new_value
-=
static_column_
->
columnWidth
(
0
);
horizontalScrollBar
()
->
setValue
(
new_value
);
}
if
(
action
==
MoveUp
&&
current
.
row
()
>
0
&&
this
->
visualRect
(
current
).
bottomLeft
().
y
()
<
static_row_
->
rowHeight
(
0
)
){
const
int
new_value
=
verticalScrollBar
()
->
value
()
+
this
->
visualRect
(
current
).
bottomRight
().
y
()
-
static_row_
->
rowHeight
(
0
);
if
(
action
==
MoveUp
&&
current
.
row
()
>
0
&&
this
->
visualRect
(
current
).
bottomLeft
().
y
()
<
static_row_
->
rowHeight
(
0
)){
int
new_value
=
verticalScrollBar
()
->
value
()
+
this
->
visualRect
(
current
).
bottomRight
().
y
();
new_value
-=
static_row_
->
rowHeight
(
0
);
verticalScrollBar
()
->
setValue
(
new_value
);
}
#endif
return
current
;
}
...
...
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