frame select layer

This commit is contained in:
2019-10-18 00:12:39 +02:00
parent 4e0520da80
commit 266573e9b4
3 changed files with 6 additions and 2 deletions

View File

@@ -3,6 +3,7 @@
#include "node_button.h"
#include "node_button_custom.h"
#include "canvas.h"
#include "app.h"
Node* NodePanelAnimation::clone_instantiate() const
{
@@ -78,7 +79,7 @@ void NodePanelAnimation::load_layers()
b->set_active(true);
m_selected_frame = b.get();
}
b->on_click = [this, fi, lid=layers[i]->id] (Node* target) {
b->on_click = [this, fi, lid=layers[i]->id, i] (Node* target) {
auto frame = static_cast<NodeAnimationFrame*>(target);
if (m_selected_frame)
m_selected_frame->set_active(false);
@@ -86,6 +87,7 @@ void NodePanelAnimation::load_layers()
m_selected_frame = frame;
m_selected_frame_layer_id = lid;
m_selected_frame_index = fi;
App::I->layers->handle_layer_selected(App::I->layers->get_layer_at(i));
};
}
}