--User changes

-Add apply all functionality to flatten/unflatten menu items.
This commit is contained in:
mfeemster 2016-05-02 17:49:58 -07:00
parent bbc5d0c783
commit 95a71ea6d7
2 changed files with 29 additions and 7 deletions

View File

@ -143,7 +143,7 @@
<item>
<widget class="QCheckBox" name="ApplyAllParamsCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Apply adjustments to all flames in the file&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Apply adjustments to all flames in the file. Also applies to flatten/unflatten menu items.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Apply All</string>
@ -3513,8 +3513,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>263</width>
<height>700</height>
<width>118</width>
<height>618</height>
</rect>
</property>
<property name="autoFillBackground">
@ -5531,8 +5531,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>259</width>
<height>652</height>
<width>133</width>
<height>52</height>
</rect>
</property>
<property name="sizePolicy">

View File

@ -753,7 +753,18 @@ void Fractorium::OnActionAddBothSymmetry(bool checked) { m_Controller->AddBothSy
/// Resets the rendering process.
/// </summary>
template <typename T>
void FractoriumEmberController<T>::Flatten() { UpdateXform([&] (Xform<T>* xform) { m_Ember.Flatten(XmlToEmber<T>::m_FlattenNames); FillVariationTreeWithXform(xform); }); }
void FractoriumEmberController<T>::Flatten()
{
UpdateXform([&] (Xform<T>* xform)
{
m_Ember.Flatten(XmlToEmber<T>::m_FlattenNames);
FillVariationTreeWithXform(xform);
}, eXformUpdate::UPDATE_CURRENT, false);//Don't update render, it'll update below.
UpdateAll([&](Ember<T>& ember)
{
ember.Flatten(XmlToEmber<T>::m_FlattenNames);
}, true, eProcessAction::FULL_RENDER, m_Fractorium->ApplyAll());
}
void Fractorium::OnActionFlatten(bool checked) { m_Controller->Flatten(); }
/// <summary>
@ -761,7 +772,18 @@ void Fractorium::OnActionFlatten(bool checked) { m_Controller->Flatten(); }
/// Resets the rendering process.
/// </summary>
template <typename T>
void FractoriumEmberController<T>::Unflatten() { UpdateXform([&] (Xform<T>* xform) { m_Ember.Unflatten(); FillVariationTreeWithXform(xform); }); }
void FractoriumEmberController<T>::Unflatten()
{
UpdateXform([&] (Xform<T>* xform)
{
m_Ember.Unflatten();
FillVariationTreeWithXform(xform);
}, eXformUpdate::UPDATE_CURRENT, false);//Don't update render, it'll update below.
UpdateAll([&](Ember<T>& ember)
{
ember.Unflatten();
}, true, eProcessAction::FULL_RENDER, m_Fractorium->ApplyAll());
}
void Fractorium::OnActionUnflatten(bool checked) { m_Controller->Unflatten(); }
/// <summary>