Not the _on_paint_node_selected virtual will properly get called in PaintSidebarModule.

This commit is contained in:
Relintai 2022-11-15 23:44:57 +01:00
parent bfd80993f2
commit 7fa6ff6433
4 changed files with 4 additions and 2 deletions

View File

@ -6,7 +6,7 @@ Color PaintProject::get_current_color() {
void PaintProject::set_current_color(const Color &color) {
_current_color = color;
emit_signal("current_color_changed", _current_color);
emit_signal("current_color_changed", _current_color);
}
PaintProject::PaintProject() {

View File

@ -45,7 +45,6 @@ String PaintEditorPlugin::get_name() const {
void PaintEditorPlugin::edit(Object *p_object) {
_sidebar->on_paint_node_selected(Object::cast_to<PaintNode>(p_object));
//make_visible(true);
}
bool PaintEditorPlugin::handles(Object *p_object) const {
return p_object->is_class("PaintNode");

View File

@ -22,6 +22,8 @@ SOFTWARE.
#include "paint_sidebar_module.h"
#include "../nodes/paint_node.h"
void PaintSidebarModule::on_paint_node_selected(PaintNode *paint_node) {
call("_on_paint_node_selected", paint_node);
}

View File

@ -33,6 +33,7 @@ class PaintSidebarModule : public PanelContainer {
public:
void on_paint_node_selected(PaintNode *paint_node);
void on_paint_node_selected_bind(Node *paint_node);
virtual void _on_paint_node_selected(Node *paint_node);
PaintSidebarModule();