Commit 2ee142a6 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix adjust to frame size option in transform/position & zoom compositions.

Related to #1193
parent a238866f
Pipeline #81460 passed with stage
in 9 minutes and 47 seconds
......@@ -163,7 +163,8 @@ void AssetPanel::showTransition(int tid, const std::shared_ptr<AssetParameterMod
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)
......@@ -511,6 +511,11 @@ void Core::refreshProjectRange(QPair<int, int> 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;
......@@ -263,6 +263,8 @@ public:
* @param configFile configuration file for KNewStuff
* @return number of installed items */
int getNewStuff(const QString &configFile);
/** @brief Get the frame size of the clip above a composition */
const QSize getCompositionSizeOnTrack(const ObjectId &id);
explicit Core();
......@@ -5606,3 +5606,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();
......@@ -751,6 +751,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);
/** @brief Register a new track. This is a call-back meant to be called from TrackModel
  • check it again code: because i'm testing this, little bug: my image scale real 6993 i try move out of video (over of x-1 image is off..)...


    Edited by manuel muzzurru
  • this little bug is for "composite and transform", instead transform/composite are work..

Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment