return false;
}
-WMError WMLayer::commitChange()
+void WMLayer::update()
{
this->state = this->tmp_state;
- return WMError::SUCCESS;
+}
+
+void WMLayer::undo()
+{
+ this->tmp_state = this->state;
}
void WMLayer::dump()
void removeLayerFromState(unsigned layer);
void setAreaToState(const std::string& app, const std::string& area);
void terminateApp(unsigned layer);
- WMError commitChange();
+ void update();
+ void undo();
// Debug
void dump();
{
HMI_INFO("Commit change");
WMError rc = WMError::SUCCESS;
+
+ // Check the number of layers
vector<unsigned> ivi_l_ids;
for(auto& l : this->wm_layers)
{
ivi_l_ids.push_back(id);
}
}
+
+ // Create render order
t_ilm_layer* id_array = new t_ilm_layer[ivi_l_ids.size()];
if(id_array == nullptr)
{
++count;
}
+ // Display
ilmErrorTypes ret = ilm_displaySetRenderOrder(this->screenID, id_array, ivi_l_ids.size());
if(ret != ILM_SUCCESS)
{
{
for(auto& l : this->wm_layers)
{
- l->commitChange();
+ l->update();
}
}
ilm_commitChanges();
return rc;
}
-void LayerControl::undoUpdate() {}
+void LayerControl::undoUpdate()
+{
+ for(auto& l : this->wm_layers)
+ {
+ l->undo();
+ }
+}
WMError LayerControl::loadLayerSetting(const string &path)
{