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
Kdenlive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
258
Issues
258
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
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
Multimedia
Kdenlive
Commits
1444cbd3
Commit
1444cbd3
authored
Aug 30, 2019
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix disabling autoscroll.
Fixes
#312
parent
4d0c9d43
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
9 deletions
+24
-9
src/core.h
src/core.h
+1
-0
src/dialogs/kdenlivesettingsdialog.cpp
src/dialogs/kdenlivesettingsdialog.cpp
+5
-0
src/timeline2/view/qml/Timeline.js
src/timeline2/view/qml/Timeline.js
+1
-1
src/timeline2/view/qml/timeline.qml
src/timeline2/view/qml/timeline.qml
+6
-6
src/timeline2/view/timelinecontroller.cpp
src/timeline2/view/timelinecontroller.cpp
+6
-0
src/timeline2/view/timelinecontroller.h
src/timeline2/view/timelinecontroller.h
+5
-2
No files found.
src/core.h
View file @
1444cbd3
...
...
@@ -237,6 +237,7 @@ signals:
/** @brief Call config dialog on a selected page / tab */
void
showConfigDialog
(
int
,
int
);
void
finalizeRecording
(
const
QString
&
captureFile
);
void
autoScrollChanged
();
};
#endif
src/dialogs/kdenlivesettingsdialog.cpp
View file @
1444cbd3
...
...
@@ -1025,6 +1025,11 @@ void KdenliveSettingsDialog::updateSettings()
emit
resetView
();
}
if
(
m_configTimeline
.
kcfg_autoscroll
->
isChecked
()
!=
KdenliveSettings
::
autoscroll
())
{
KdenliveSettings
::
setAutoscroll
(
m_configTimeline
.
kcfg_autoscroll
->
isChecked
());
pCore
->
autoScrollChanged
();
}
// Mimes
if
(
m_configEnv
.
kcfg_addedExtensions
->
text
()
!=
KdenliveSettings
::
addedExtensions
())
{
// Update list
...
...
src/timeline2/view/qml/Timeline.js
View file @
1444cbd3
...
...
@@ -17,8 +17,8 @@
*/
function
scrollIfNeeded
()
{
var
x
=
timeline
.
position
*
timeline
.
scaleFactor
;
if
(
!
scrollView
)
return
;
var
x
=
timeline
.
position
*
timeline
.
scaleFactor
;
if
(
x
>
scrollView
.
flickableItem
.
contentX
+
scrollView
.
width
-
50
)
scrollView
.
flickableItem
.
contentX
=
x
-
scrollView
.
width
+
50
;
else
if
(
x
<
50
)
...
...
src/timeline2/view/qml/timeline.qml
View file @
1444cbd3
...
...
@@ -217,7 +217,7 @@ Rectangle {
property
real
baseUnit
:
fontMetrics
.
font
.
pointSize
property
color
selectedTrackColor
:
Qt
.
rgba
(
activePalette
.
highlight
.
r
,
activePalette
.
highlight
.
g
,
activePalette
.
highlight
.
b
,
0.2
)
property
color
frameColor
:
Qt
.
rgba
(
activePalette
.
shadow
.
r
,
activePalette
.
shadow
.
g
,
activePalette
.
shadow
.
b
,
0.3
)
property
bool
stopScrolling
:
false
property
bool
autoScrolling
:
timeline
.
autoScroll
property
int
duration
:
timeline
.
duration
property
color
audioColor
:
timeline
.
audioColor
property
color
videoColor
:
timeline
.
videoColor
...
...
@@ -822,10 +822,10 @@ Rectangle {
drag.smoothed
:
false
onPressed
:
{
root
.
stopScrolling
=
tru
e
root
.
autoScrolling
=
fals
e
}
onReleased
:
{
root
.
stopScrolling
=
false
root
.
autoScrolling
=
timeline
.
autoScroll
parent
.
opacity
=
0
}
onEntered
:
parent
.
opacity
=
0.5
...
...
@@ -1136,7 +1136,7 @@ Rectangle {
controller
.
requestAddToSelection
(
dragProxy
.
draggedItem
,
/*clear=*/
true
)
}
timeline
.
showAsset
(
dragProxy
.
draggedItem
)
root
.
stopScrolling
=
tru
e
root
.
autoScrolling
=
fals
e
clipBeingMovedId
=
dragProxy
.
draggedItem
if
(
dragProxy
.
draggedItem
>
-
1
)
{
var
tk
=
controller
.
getItemTrackId
(
dragProxy
.
draggedItem
)
...
...
@@ -1230,7 +1230,7 @@ Rectangle {
}
onReleased
:
{
clipBeingMovedId
=
-
1
root
.
stopScrolling
=
false
root
.
autoScrolling
=
timeline
.
autoScroll
if
(
dragProxy
.
draggedItem
>
-
1
&&
dragFrame
>
-
1
&&
(
controller
.
isClip
(
dragProxy
.
draggedItem
)
||
controller
.
isComposition
(
dragProxy
.
draggedItem
)))
{
var
tId
=
controller
.
getItemTrackId
(
dragProxy
.
draggedItem
)
if
(
dragProxy
.
isComposition
)
{
...
...
@@ -1488,7 +1488,7 @@ Rectangle {
Connections
{
target
:
timeline
onPositionChanged
:
if
(
!
stop
Scrolling
)
Logic
.
scrollIfNeeded
()
onPositionChanged
:
if
(
auto
Scrolling
)
Logic
.
scrollIfNeeded
()
onFrameFormatChanged
:
ruler
.
adjustFormat
()
onSelectionChanged
:
{
if
(
dragProxy
.
draggedItem
>
-
1
&&
!
timeline
.
exists
(
dragProxy
.
draggedItem
))
{
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
1444cbd3
...
...
@@ -80,6 +80,7 @@ TimelineController::TimelineController(QObject *parent)
connect
(
this
,
&
TimelineController
::
audioTargetChanged
,
this
,
&
TimelineController
::
updateAudioTarget
);
m_disablePreview
->
setEnabled
(
false
);
connect
(
pCore
.
get
(),
&
Core
::
finalizeRecording
,
this
,
&
TimelineController
::
finishRecording
);
connect
(
pCore
.
get
(),
&
Core
::
autoScrollChanged
,
this
,
&
TimelineController
::
autoScrollChanged
);
}
TimelineController
::~
TimelineController
()
...
...
@@ -1919,6 +1920,11 @@ bool TimelineController::hasVideoTarget() const
return
m_hasVideoTarget
;
}
bool
TimelineController
::
autoScroll
()
const
{
return
KdenliveSettings
::
autoscroll
();
}
void
TimelineController
::
resetTrackHeight
()
{
int
tracksCount
=
m_model
->
getTracksCount
();
...
...
src/timeline2/view/timelinecontroller.h
View file @
1444cbd3
...
...
@@ -67,12 +67,13 @@ class TimelineController : public QObject
Q_PROPERTY
(
int
activeTrack
READ
activeTrack
WRITE
setActiveTrack
NOTIFY
activeTrackChanged
)
Q_PROPERTY
(
int
audioTarget
READ
audioTarget
WRITE
setAudioTarget
NOTIFY
audioTargetChanged
)
Q_PROPERTY
(
int
videoTarget
READ
videoTarget
WRITE
setVideoTarget
NOTIFY
videoTargetChanged
)
Q_PROPERTY
(
int
lastAudioTarget
MEMBER
m_lastAudioTarget
NOTIFY
lastAudioTargetChanged
)
Q_PROPERTY
(
int
lastVideoTarget
MEMBER
m_lastVideoTarget
NOTIFY
lastVideoTargetChanged
)
Q_PROPERTY
(
bool
hasAudioTarget
READ
hasAudioTarget
NOTIFY
hasAudioTargetChanged
)
Q_PROPERTY
(
bool
hasVideoTarget
READ
hasVideoTarget
NOTIFY
hasVideoTargetChanged
)
Q_PROPERTY
(
bool
autoScroll
READ
autoScroll
NOTIFY
autoScrollChanged
)
Q_PROPERTY
(
QColor
videoColor
READ
videoColor
NOTIFY
colorsChanged
)
Q_PROPERTY
(
QColor
audioColor
READ
audioColor
NOTIFY
colorsChanged
)
Q_PROPERTY
(
QColor
lockedColor
READ
lockedColor
NOTIFY
colorsChanged
)
...
...
@@ -150,6 +151,7 @@ public:
Q_INVOKABLE
int
videoTarget
()
const
;
Q_INVOKABLE
bool
hasAudioTarget
()
const
;
Q_INVOKABLE
bool
hasVideoTarget
()
const
;
Q_INVOKABLE
bool
autoScroll
()
const
;
Q_INVOKABLE
int
activeTrack
()
const
{
return
m_activeTrack
;
}
Q_INVOKABLE
QColor
videoColor
()
const
;
Q_INVOKABLE
QColor
audioColor
()
const
;
...
...
@@ -541,6 +543,7 @@ signals:
void
hasAudioTargetChanged
();
void
hasVideoTargetChanged
();
void
lastAudioTargetChanged
();
void
autoScrollChanged
();
void
lastVideoTargetChanged
();
void
activeTrackChanged
();
void
colorsChanged
();
...
...
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