Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortamasmeszaros <meszaros.q@gmail.com>2020-01-15 12:39:07 +0300
committertamasmeszaros <meszaros.q@gmail.com>2020-01-15 12:39:07 +0300
commita36c7c76ccacb0c7ec60ab383938daf4012885d4 (patch)
tree284dd8f364ae5a215a101bdd5907cc1fbb488540 /sandboxes
parent929e467df915a16ec99ab08a4e55c7b11b226dc4 (diff)
Fix scene not being centered
Diffstat (limited to 'sandboxes')
-rw-r--r--sandboxes/opencsg/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/sandboxes/opencsg/main.cpp b/sandboxes/opencsg/main.cpp
index ab379c196..a0d5c4ceb 100644
--- a/sandboxes/opencsg/main.cpp
+++ b/sandboxes/opencsg/main.cpp
@@ -446,13 +446,13 @@ void MyFrame::activate_canvas_display()
m_canvas->Bind(wxEVT_PAINT, [this](wxPaintEvent &) {
// This is required even though dc is not used otherwise.
wxPaintDC dc(this);
- const wxSize csize = GetClientSize();
+ const wxSize csize = m_canvas->GetClientSize();
m_canvas->get_display()->set_screen_size(csize.x, csize.y);
m_canvas->get_display()->repaint();
});
- m_canvas->Bind(wxEVT_SIZE, [this](wxSizeEvent &) {
- const wxSize csize = GetClientSize();
+ m_canvas->Bind(wxEVT_SIZE, [this](wxSizeEvent &) {
+ const wxSize csize = m_canvas->GetClientSize();
m_canvas->get_display()->set_screen_size(csize.x, csize.y);
m_canvas->get_display()->repaint();
});