Route default canvas resolution through platform services
This commit is contained in:
@@ -153,7 +153,8 @@ void NodeCanvas::init()
|
||||
|
||||
m_mouse_ignore = false;
|
||||
m_canvas = std::make_unique<Canvas>();
|
||||
m_canvas->create(CANVAS_RES, CANVAS_RES);
|
||||
const int canvas_resolution = App::I->default_canvas_resolution();
|
||||
m_canvas->create(canvas_resolution, canvas_resolution);
|
||||
m_canvas->m_unsaved = false;
|
||||
m_canvas->m_node = this;
|
||||
|
||||
@@ -179,7 +180,8 @@ void NodeCanvas::init()
|
||||
void NodeCanvas::restore_context()
|
||||
{
|
||||
Node::restore_context();
|
||||
m_canvas->create(CANVAS_RES, CANVAS_RES);
|
||||
const int canvas_resolution = App::I->default_canvas_resolution();
|
||||
m_canvas->create(canvas_resolution, canvas_resolution);
|
||||
|
||||
m_sampler.create();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user