update android projects
This commit is contained in:
@@ -61,6 +61,8 @@ add_library(
|
||||
../../src/app_vr.cpp
|
||||
../../src/brush.cpp
|
||||
../../src/canvas.cpp
|
||||
../../src/canvas_layer.cpp
|
||||
../../src/canvas_actions.cpp
|
||||
../../src/canvas_modes.cpp
|
||||
../../src/log.cpp
|
||||
../../src/action.cpp
|
||||
|
||||
@@ -77,6 +77,8 @@ add_library(
|
||||
../../src/app_vr.cpp
|
||||
../../src/brush.cpp
|
||||
../../src/canvas.cpp
|
||||
../../src/canvas_layer.cpp
|
||||
../../src/canvas_actions.cpp
|
||||
../../src/canvas_modes.cpp
|
||||
../../src/log.cpp
|
||||
../../src/action.cpp
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
int h = 0;
|
||||
struct Snapshot
|
||||
{
|
||||
std::shared_ptr<uint8_t[]> image[6] = SIXPLETTE(0);
|
||||
std::unique_ptr<uint8_t[]> image[6] = SIXPLETTE(0);
|
||||
glm::vec4 m_dirty_box[6] = SIXPLETTE(glm::vec4(0));
|
||||
bool m_dirty_face[6] = SIXPLETTE(false);
|
||||
int width = 0;
|
||||
|
||||
@@ -375,7 +375,8 @@ void NodePanelLayer::merge(int src_index, int dst_index, bool create_history)
|
||||
a->m_dirty_box[i] = Canvas::I->m_layers[dst_index]->m_dirty_box[i];
|
||||
a->m_dirty_face[i] = Canvas::I->m_layers[dst_index]->m_dirty_face[i];
|
||||
}
|
||||
a->m_snap = Canvas::I->m_layers[dst_index]->snapshot(
|
||||
a->m_snap = std::make_shared<Layer::Snapshot>();
|
||||
*a->m_snap = Canvas::I->m_layers[dst_index]->snapshot(
|
||||
Canvas::I->m_layers[src_index]->m_dirty_box, Canvas::I->m_layers[src_index]->m_dirty_face);
|
||||
a->m_layer = Canvas::I->m_layers[src_index];
|
||||
a->m_layer_node = std::static_pointer_cast<NodeLayer>(m_layers_container->m_children[src_index]);
|
||||
@@ -472,7 +473,7 @@ void ActionLayerMerge::undo()
|
||||
{
|
||||
if (m_direction == Direction::Undo)
|
||||
{
|
||||
Canvas::I->m_layers[m_dst_index]->restore(m_snap);
|
||||
Canvas::I->m_layers[m_dst_index]->restore(*m_snap);
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
Canvas::I->m_layers[m_dst_index]->m_dirty_box[i] = m_dirty_box[i];
|
||||
|
||||
@@ -119,7 +119,7 @@ public:
|
||||
struct ActionLayerMerge : public Action
|
||||
{
|
||||
enum class Direction { Undo, Redo } m_direction;
|
||||
Layer::Snapshot m_snap;
|
||||
std::shared_ptr<Layer::Snapshot> m_snap;
|
||||
std::shared_ptr<Layer> m_layer;
|
||||
std::shared_ptr<NodeLayer> m_layer_node;
|
||||
std::shared_ptr<NodePanelLayer> m_panel;
|
||||
|
||||
Reference in New Issue
Block a user