Skip to content

Commit

Permalink
Problem #871 fixed. There was missing parameter synchronization just …
Browse files Browse the repository at this point in the history
…before inserting of parameter to animation table.
  • Loading branch information
buddhi1980 committed Aug 25, 2021
1 parent 4eecb65 commit bef4c04
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 1 addition & 2 deletions mandelbulber2/qt/common_my_widget_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ const QAction *CommonMyWidgetWrapper::contextMenuEvent(
}
else if (selectedItem == actionAddToKeyframeAnimation)
{
gKeyframes->AddAnimatedParameter(
getFullParameterName(), parameterContainer->GetAsOneParameter(getFullParameterName()));
gKeyframeAnimation->AddAnimatedParameter(getFullParameterName(), parameterContainer);
gKeyframeAnimation->RefreshTable();
}
else if (selectedItem == actionRemoveFromKeyframeAnimation)
Expand Down
8 changes: 8 additions & 0 deletions mandelbulber2/src/animation_keyframes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2230,6 +2230,14 @@ void cKeyframeAnimation::slotSetFramesPerKeyframeToAllKeyframes(void)
RefreshTable();
}

void cKeyframeAnimation::AddAnimatedParameter(
const QString &parameterName, std::shared_ptr<cParameterContainer> parameterContainer)
{
mainInterface->SynchronizeInterface(params, fractalParams, qInterface::read);
keyframes->AddAnimatedParameter(
parameterName, parameterContainer->GetAsOneParameter(parameterName));
}

cKeyframeRenderThread::cKeyframeRenderThread(QString &_settingsText) : QThread()
{
settingsText = _settingsText;
Expand Down
2 changes: 2 additions & 0 deletions mandelbulber2/src/animation_keyframes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ class cKeyframeAnimation : public QObject
void DeleteRenderedFramesForKeyframe(int keyframeInxed);
void CopyToAllKeyframes(int row, int column);
void ModifyValueInCells(const QList<QTableWidgetItem *> &selectedItemsList, enumModifyMode mode);
void AddAnimatedParameter(
const QString &parameterName, std::shared_ptr<cParameterContainer> parameterContainer);

public slots:
void UpdateLimitsForFrameRange() const;
Expand Down

0 comments on commit bef4c04

Please sign in to comment.