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
e2c4c7c1
Commit
e2c4c7c1
authored
Apr 07, 2019
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't allow resizing while dragging. Fixes
#134
parent
f9b69acd
Pipeline
#2293
passed with stage
in 21 minutes and 49 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
+24
-0
src/timeline2/view/qml/timeline.qml
src/timeline2/view/qml/timeline.qml
+4
-0
src/timeline2/view/timelinecontroller.cpp
src/timeline2/view/timelinecontroller.cpp
+18
-0
src/timeline2/view/timelinecontroller.h
src/timeline2/view/timelinecontroller.h
+2
-0
No files found.
src/timeline2/view/qml/timeline.qml
View file @
e2c4c7c1
...
...
@@ -160,6 +160,10 @@ Rectangle {
scrollTimer
.
running
=
false
scrollTimer
.
stop
()
}
function
isDragging
()
{
return
dragProxy
.
draggedItem
>
-
1
&&
dragProxyArea
.
pressed
}
function
initDrag
(
itemObject
,
itemCoord
,
itemId
,
itemPos
,
itemTrack
,
isComposition
)
{
dragProxy
.
x
=
itemObject
.
modelStart
*
timeScale
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
e2c4c7c1
...
...
@@ -556,8 +556,21 @@ void TimelineController::unGroupSelection(int cid)
}
}
bool
TimelineController
::
dragOperationRunning
()
{
QVariant
returnedValue
;
QMetaObject
::
invokeMethod
(
m_root
,
"isDragging"
,
Q_RETURN_ARG
(
QVariant
,
returnedValue
));
return
returnedValue
.
toBool
();
}
void
TimelineController
::
setInPoint
()
{
if
(
dragOperationRunning
())
{
// Don't allow timeline operation while drag in progress
qDebug
()
<<
"Cannot operate while dragging"
;
return
;
}
int
cursorPos
=
timelinePosition
();
const
auto
selection
=
m_model
->
getCurrentSelection
();
if
(
!
selection
.
empty
())
{
...
...
@@ -579,6 +592,11 @@ int TimelineController::timelinePosition() const
void
TimelineController
::
setOutPoint
()
{
if
(
dragOperationRunning
())
{
// Don't allow timeline operation while drag in progress
qDebug
()
<<
"Cannot operate while dragging"
;
return
;
}
int
cursorPos
=
timelinePosition
();
const
auto
selection
=
m_model
->
getCurrentSelection
();
if
(
!
selection
.
empty
())
{
...
...
src/timeline2/view/timelinecontroller.h
View file @
e2c4c7c1
...
...
@@ -439,6 +439,8 @@ public:
void
grabCurrent
();
/** @brief Returns keys for all used thumbnails */
QStringList
getThumbKeys
();
/** @brief Returns true if a drag operation is currently running in timeline */
bool
dragOperationRunning
();
public
slots
:
void
resetView
();
...
...
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