Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
c5f9379b
Commit
c5f9379b
authored
Sep 16, 2021
by
Jean-Baptiste Mardelle
Browse files
Fix same track transition erratic resize
parent
85201ee8
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/timeline2/view/qml/Clip.qml
View file @
c5f9379b
...
...
@@ -419,9 +419,9 @@ Rectangle {
mixCutPos
.
anchors
.
right
=
undefined
}
onReleased
:
{
controller
.
resizeStartMix
(
clipRoot
.
clipId
,
Math
.
round
(
Math
.
max
(
0
,
x
)
/
clipRoot
.
timeScale
),
mouse
.
modifiers
&
Qt
.
ShiftModifier
)
root
.
autoScrolling
=
timeline
.
autoScroll
if
(
sizeChanged
)
{
controller
.
resizeStartMix
(
clipRoot
.
clipId
,
Math
.
round
(
Math
.
max
(
0
,
x
)
/
clipRoot
.
timeScale
),
mouse
.
modifiers
&
Qt
.
ShiftModifier
)
sizeChanged
=
false
}
anchors
.
left
=
parent
.
left
...
...
@@ -436,8 +436,6 @@ Rectangle {
if
(
currentFrame
!=
previousMix
)
{
parent
.
width
=
currentFrame
*
clipRoot
.
timeScale
sizeChanged
=
true
//TODO: resize mix's other clip
//clipRoot.trimmingIn(clipRoot, newDuration, mouse, shiftTrim, controlTrim)
}
if
(
x
<
mixCutPos
.
x
)
{
// This will delete the mix
...
...
src/transitions/view/mixstackview.cpp
View file @
c5f9379b
...
...
@@ -63,6 +63,7 @@ MixStackView::MixStackView(QWidget *parent)
m_durationLayout
->
addWidget
(
m_alignRight
);
m_durationLayout
->
addWidget
(
m_alignCenter
);
m_durationLayout
->
addWidget
(
m_alignLeft
);
connect
(
m_duration
,
&
TimecodeDisplay
::
timeCodeUpdated
,
this
,
&
MixStackView
::
updateDuration
);
}
void
MixStackView
::
setModel
(
const
std
::
shared_ptr
<
AssetParameterModel
>
&
model
,
QSize
frameSize
,
bool
addSpacer
)
...
...
@@ -82,11 +83,15 @@ void MixStackView::setModel(const std::shared_ptr<AssetParameterModel> &model, Q
pCore
->
getMonitor
(
m_model
->
monitorId
)
->
slotShowEffectScene
(
needsMonitorEffectScene
());
if
(
m_model
->
rowCount
()
>
0
)
{
QSignalBlocker
bk0
(
m_duration
);
m_duration
->
setValue
(
m_model
->
data
(
m_model
->
index
(
0
,
0
),
AssetParameterModel
::
ParentDurationRole
).
toInt
());
connect
(
m_model
.
get
(),
&
AssetParameterModel
::
dataChanged
,
this
,
&
MixStackView
::
durationChanged
);
}
int
mainClipId
=
stackOwner
().
second
;
MixAlignment
align
=
pCore
->
getMixAlign
(
mainClipId
);
QSignalBlocker
bk1
(
m_alignLeft
);
QSignalBlocker
bk2
(
m_alignRight
);
QSignalBlocker
bk3
(
m_alignCenter
);
m_alignLeft
->
setChecked
(
false
);
m_alignRight
->
setChecked
(
false
);
m_alignCenter
->
setChecked
(
false
);
...
...
@@ -105,16 +110,15 @@ void MixStackView::setModel(const std::shared_ptr<AssetParameterModel> &model, Q
break
;
}
m_model
->
data
(
m_model
->
index
(
0
,
0
),
AssetParameterModel
::
ParentDurationRole
).
toInt
();
connect
(
m_duration
,
&
TimecodeDisplay
::
timeCodeUpdated
,
this
,
&
MixStackView
::
updateDuration
);
m_lay
->
addLayout
(
m_durationLayout
);
m_lay
->
addStretch
(
10
);
slotRefresh
();
}
void
MixStackView
::
durationChanged
(
const
QModelIndex
&
,
const
QModelIndex
&
,
const
QVector
<
int
>
&
roles
)
{
if
(
roles
.
contains
(
AssetParameterModel
::
ParentDurationRole
))
{
QSignalBlocker
bk1
(
m_duration
);
m_duration
->
setValue
(
m_model
->
data
(
m_model
->
index
(
0
,
0
),
AssetParameterModel
::
ParentDurationRole
).
toInt
());
}
}
...
...
Write
Preview
Supports
Markdown
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