fix floating panels on ui restore

This commit is contained in:
2019-08-31 15:43:20 +02:00
parent eaa20c0270
commit b71abde9d7

View File

@@ -1497,7 +1497,7 @@ void App::ui_restore()
{
case NodePanelFloating::kClass::Presets:
{
auto floating_presets = f->m_container->add_child<NodePanelBrushPreset>();
floating_presets = f->m_container->add_child_ref<NodePanelBrushPreset>();
floating_presets->SetHeightP(100);
floating_presets->find("toolbar")->destroy();
floating_presets->on_brush_changed = [this](Node* target, std::shared_ptr<Brush>& b) {
@@ -1511,7 +1511,7 @@ void App::ui_restore()
}
case NodePanelFloating::kClass::Color:
{
auto floating_color = f->m_container->add_child<NodePanelColor>();
floating_color = f->m_container->add_child_ref<NodePanelColor>();
floating_color->SetHeightP(100);
floating_color->find("title")->destroy();
floating_color->on_color_changed = [this](Node* target, glm::vec4 color) {