--Code changes

-Remove boolean parameter in AddXformsWithXaos().
This commit is contained in:
Person 2020-03-12 23:41:44 -07:00
parent 6870de4c7f
commit ce0961a236
4 changed files with 5 additions and 6 deletions

View File

@ -489,7 +489,7 @@ public:
void FillWithXform(Xform<T>* xform);
Xform<T>* CurrentXform();
void UpdateXform(std::function<void(Xform<T>*, size_t, size_t)> func, eXformUpdate updateType = eXformUpdate::UPDATE_CURRENT, bool updateRender = true, eProcessAction action = eProcessAction::FULL_RENDER, size_t index = 0);
static void AddXformsWithXaos(Ember<T>& ember, std::vector<std::pair<Xform<T>, size_t>>& xforms, bool preserveXaos, eXaosPasteStyle pastestyle);
static void AddXformsWithXaos(Ember<T>& ember, std::vector<std::pair<Xform<T>, size_t>>& xforms, eXaosPasteStyle pastestyle);
//Xforms Affine.
virtual void AffineSetHelper(double d, int index, bool pre) override;

View File

@ -812,7 +812,7 @@ void FractoriumEmberController<T>::PasteSelectedXforms()
{
Update([&]()
{
AddXformsWithXaos(m_Ember, m_CopiedXforms, true, m_Fractorium->GetXaosPasteStyleType());
AddXformsWithXaos(m_Ember, m_CopiedXforms, m_Fractorium->GetXaosPasteStyleType());
if (!m_CopiedFinalXform.Empty())
m_Ember.SetFinalXform(m_CopiedFinalXform);

View File

@ -265,7 +265,7 @@ void FractoriumEmberController<T>::AddLayer(int xforms)
Update([&]
{
std::vector<std::pair<Xform<T>, size_t>> vec(xforms);
AddXformsWithXaos(m_Ember, vec, false, eXaosPasteStyle::ZERO_TO_ONE);
AddXformsWithXaos(m_Ember, vec, eXaosPasteStyle::ZERO_TO_ONE);
});
FillXforms();

View File

@ -211,10 +211,9 @@ void Fractorium::OnAddLinkedXformButtonClicked(bool checked) { m_Controller->Add
/// </summary>
/// <param name="ember">The ember to add xforms to</param>
/// <param name="xforms">The vector of xforms to add</param>
/// <param name="preserveXaos">True to preserve xaos else false.</param>
/// <param name="eXaosPasteStyle">The method which governs how the copying of xaos values is handles</param>
template <typename T>
void FractoriumEmberController<T>::AddXformsWithXaos(Ember<T>& ember, std::vector<std::pair<Xform<T>, size_t>>& xforms, bool preserveXaos, eXaosPasteStyle pastestyle)
void FractoriumEmberController<T>::AddXformsWithXaos(Ember<T>& ember, std::vector<std::pair<Xform<T>, size_t>>& xforms, eXaosPasteStyle pastestyle)
{
auto oldxfcount = ember.XformCount();
@ -309,7 +308,7 @@ void FractoriumEmberController<T>::DuplicateXform()
}, eXformUpdate::UPDATE_SELECTED_EXCEPT_FINAL, false);
Update([&]()
{
AddXformsWithXaos(m_Ember, vec, true, m_Fractorium->GetXaosPasteStyleType());
AddXformsWithXaos(m_Ember, vec, m_Fractorium->GetXaosPasteStyleType());
int index = int(m_Ember.TotalXformCount(forceFinal) - (forceFinal ? 2 : 1));//Set index to the last item before final.
FillXforms(index);//Handles xaos.
});