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
7c483d31
Commit
7c483d31
authored
Sep 19, 2021
by
Jean-Baptiste Mardelle
Browse files
Fix adjust to frame size option in transform/position & zoom compositions.
Related to
#1193
parent
d9af07d0
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/assets/assetpanel.cpp
View file @
7c483d31
...
...
@@ -168,7 +168,8 @@ void AssetPanel::showTransition(int tid, const std::shared_ptr<AssetParameterMod
m_transitionWidget
->
setVisible
(
true
);
m_timelineButton
->
setVisible
(
true
);
m_enableStackButton
->
setVisible
(
false
);
m_transitionWidget
->
setModel
(
transitionModel
,
QSize
(),
true
);
QSize
s
=
pCore
->
getCompositionSizeOnTrack
(
id
);
m_transitionWidget
->
setModel
(
transitionModel
,
s
,
true
);
}
void
AssetPanel
::
showMix
(
int
cid
,
const
std
::
shared_ptr
<
AssetParameterModel
>
&
transitionModel
)
...
...
src/core.cpp
View file @
7c483d31
...
...
@@ -469,6 +469,11 @@ void Core::refreshProjectRange(QPair<int, int> range)
m_monitorManager
->
refreshProjectRange
(
range
);
}
const
QSize
Core
::
getCompositionSizeOnTrack
(
const
ObjectId
&
id
)
{
return
m_mainWindow
->
getCurrentTimeline
()
->
controller
()
->
getModel
()
->
getCompositionSizeOnTrack
(
id
);
}
int
Core
::
getItemPosition
(
const
ObjectId
&
id
)
{
if
(
!
m_guiConstructed
)
return
0
;
...
...
src/core.h
View file @
7c483d31
...
...
@@ -264,6 +264,8 @@ public:
MixAlignment
getMixAlign
(
int
cid
)
const
;
/** @brief Closing current document, do some cleanup */
void
cleanup
();
/** @brief Get the frame size of the clip above a composition */
const
QSize
getCompositionSizeOnTrack
(
const
ObjectId
&
id
);
private:
explicit
Core
();
...
...
src/timeline2/model/timelinemodel.cpp
View file @
7c483d31
...
...
@@ -5512,3 +5512,14 @@ QVariantList TimelineModel::getMasterEffectZones() const
}
return
{};
}
const
QSize
TimelineModel
::
getCompositionSizeOnTrack
(
const
ObjectId
&
id
)
{
int
pos
=
getCompositionPosition
(
id
.
second
);
int
tid
=
getCompositionTrackId
(
id
.
second
);
int
cid
=
getTrackById_const
(
tid
)
->
getClipByPosition
(
pos
);
if
(
cid
>
-
1
)
{
return
getClipFrameSize
(
cid
);
}
return
QSize
();
}
src/timeline2/model/timelinemodel.hpp
View file @
7c483d31
...
...
@@ -746,6 +746,8 @@ public:
void
requestResizeMix
(
int
cid
,
int
duration
,
MixAlignment
align
);
MixAlignment
getMixAlign
(
int
cid
)
const
;
std
::
shared_ptr
<
SubtitleModel
>
getSubtitleModel
();
/** @brief Get the frame size of the clip above a composition */
const
QSize
getCompositionSizeOnTrack
(
const
ObjectId
&
id
);
protected:
/** @brief Register a new track. This is a call-back meant to be called from TrackModel
...
...
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