add history to equirect import
This commit is contained in:
@@ -96,3 +96,51 @@ Action* ActionStroke::get_redo()
|
||||
action->clear_layer = false;
|
||||
return action;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Action* ActionLayerClear::get_redo()
|
||||
{
|
||||
auto a = new ActionLayerClear;
|
||||
a->m_direction = reverse_direction();
|
||||
a->m_snap = m_snap;
|
||||
a->m_layer = m_layer;
|
||||
a->m_color = m_color;
|
||||
return a;
|
||||
}
|
||||
|
||||
void ActionLayerClear::undo()
|
||||
{
|
||||
if (m_direction == Direction::Undo)
|
||||
{
|
||||
m_layer->restore(*m_snap);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_layer->clear(m_color);
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Action* ActionImportEquirect::get_redo()
|
||||
{
|
||||
auto a = new ActionImportEquirect;
|
||||
a->m_direction = reverse_direction();
|
||||
a->m_snap = m_snap;
|
||||
a->m_layer = m_layer;
|
||||
a->m_path = m_path;
|
||||
return a;
|
||||
}
|
||||
|
||||
void ActionImportEquirect::undo()
|
||||
{
|
||||
if (m_direction == Direction::Undo)
|
||||
{
|
||||
m_layer->restore(*m_snap);
|
||||
}
|
||||
else
|
||||
{
|
||||
Canvas::I->import_equirectangular_thread(m_path, m_layer);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user