animated layer merge warning, fix timeline update on document open
This commit is contained in:
@@ -1206,10 +1206,17 @@ void App::init_menu_layer()
|
|||||||
|
|
||||||
popup->find<NodeButtonCustom>("layer-merge")->on_click = [this, popup](Node*) {
|
popup->find<NodeButtonCustom>("layer-merge")->on_click = [this, popup](Node*) {
|
||||||
//layers->get_child_index(layers->)
|
//layers->get_child_index(layers->)
|
||||||
int current_idx_order = Canvas::I->m_current_layer_idx;
|
if (Canvas::I->anim_duration() > 1)
|
||||||
if (current_idx_order > 0)
|
|
||||||
{
|
{
|
||||||
layers->merge(current_idx_order, current_idx_order - 1, true);
|
message_box("Not supported", "Merging animated layers is not supported yet.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int current_idx_order = Canvas::I->m_current_layer_idx;
|
||||||
|
if (current_idx_order > 0)
|
||||||
|
{
|
||||||
|
layers->merge(current_idx_order, current_idx_order - 1, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
popup->mouse_release();
|
popup->mouse_release();
|
||||||
popup->destroy();
|
popup->destroy();
|
||||||
|
|||||||
@@ -2560,9 +2560,12 @@ bool Canvas::project_open_thread(std::string file_path)
|
|||||||
if (App::I->layout.m_loaded)
|
if (App::I->layout.m_loaded)
|
||||||
{
|
{
|
||||||
pb->destroy();
|
pb->destroy();
|
||||||
App::I->title_update();
|
App::I->ui_task([] {
|
||||||
App::I->update_rec_frames();
|
App::I->title_update();
|
||||||
App::I->animation->load_layers();
|
App::I->update_rec_frames();
|
||||||
|
Canvas::I->anim_update();
|
||||||
|
App::I->animation->load_layers();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user