Centralize retained drag capture release
This commit is contained in:
@@ -151,10 +151,10 @@ void NodePanelBrush::init()
|
||||
auto mb = App::I->message_box("Brushes", "Could not read brush textures file, it will be deleted.", true);
|
||||
mb->btn_ok->on_click = [this, mb](Node*) {
|
||||
Asset::delete_file(App::I->data_path + "/settings/" + m_dir_name + ".bin");
|
||||
mb->destroy();
|
||||
pp::panopainter::close_legacy_dialog_node(*mb);
|
||||
};
|
||||
mb->btn_cancel->on_click = [mb](Node*) {
|
||||
mb->destroy();
|
||||
pp::panopainter::close_legacy_dialog_node(*mb);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -615,7 +615,7 @@ void NodePanelBrushPreset::init()
|
||||
if (plan) {
|
||||
execute_preset_list_plan(plan.value());
|
||||
}
|
||||
mb->destroy();
|
||||
pp::panopainter::close_legacy_dialog_node(*mb);
|
||||
};
|
||||
break;
|
||||
}
|
||||
@@ -645,10 +645,10 @@ void NodePanelBrushPreset::init()
|
||||
auto mb = App::I->message_box("Presets", "Could not read brush presets file, it will be deleted.", true);
|
||||
mb->btn_ok->on_click = [mb](Node*) {
|
||||
Asset::delete_file(App::I->data_path + "/settings/presets.bin");
|
||||
mb->destroy();
|
||||
pp::panopainter::close_legacy_dialog_node(*mb);
|
||||
};
|
||||
mb->btn_cancel->on_click = [mb](Node*) {
|
||||
mb->destroy();
|
||||
pp::panopainter::close_legacy_dialog_node(*mb);
|
||||
};
|
||||
}
|
||||
m_notification->SetVisibility(m_container->m_children.size() == 0);
|
||||
@@ -902,7 +902,7 @@ bool NodePanelBrushPreset::export_ppbr(const std::string& path_in, const PPBRInf
|
||||
}
|
||||
f.write((char*)sw.m_data.data(), sw.m_data.size());
|
||||
|
||||
pb->destroy();
|
||||
pp::panopainter::close_legacy_dialog_node(*pb);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1047,7 +1047,7 @@ bool NodePanelBrushPreset::import_ppbr(const std::string& path)
|
||||
save();
|
||||
App::I->stroke->m_brush_popup->reload();
|
||||
|
||||
pb->destroy();
|
||||
pp::panopainter::close_legacy_dialog_node(*pb);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1143,7 +1143,7 @@ bool NodePanelBrushPreset::import_abr(const std::string& path)
|
||||
|
||||
save();
|
||||
App::I->stroke->m_brush_popup->reload();
|
||||
pb->destroy();
|
||||
pp::panopainter::close_legacy_dialog_node(*pb);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user