Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLMC
Commits
e032aac6
Commit
e032aac6
authored
Mar 23, 2010
by
Ludovic Fauvet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
timeline: workaround for a viewport update bug.
parent
ff02f68b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
src/Gui/timeline/GraphicsCursorItem.cpp
src/Gui/timeline/GraphicsCursorItem.cpp
+6
-0
No files found.
src/Gui/timeline/GraphicsCursorItem.cpp
View file @
e032aac6
...
...
@@ -21,6 +21,7 @@
*****************************************************************************/
#include <QtDebug>
#include <QGraphicsScene>
#include <QGraphicsItem>
#include <QGraphicsSceneMouseEvent>
#include <QPainter>
...
...
@@ -57,6 +58,11 @@ QVariant GraphicsCursorItem::itemChange( GraphicsItemChange change, const QVaria
//Position is changing :
if
(
change
==
QGraphicsItem
::
ItemPositionChange
)
{
// When the cursor is moving fast, the viewport buffer
// is not correctly updated, forcing it now.
scene
()
->
update
(
pos
().
x
(),
pos
().
y
(),
m_boundingRect
.
width
(),
m_boundingRect
.
height
()
);
// Keep the y axis in-place.
qreal
posX
=
value
.
toPointF
().
x
();
if
(
posX
<
0
)
posX
=
0
;
return
QPoint
(
(
int
)
posX
,
(
int
)
pos
().
y
()
);
...
...
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