From fbeddb0defaa32ffc6878418b4251523ad45f031 Mon Sep 17 00:00:00 2001 From: Tats Date: Sat, 23 Nov 2013 17:43:12 -0500 Subject: [PATCH] Fix: move lines (focus by clicking) --- MapperGLCanvas.cpp | 2 +- main.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/MapperGLCanvas.cpp b/MapperGLCanvas.cpp index b2fb6cf..b1c1183 100644 --- a/MapperGLCanvas.cpp +++ b/MapperGLCanvas.cpp @@ -116,7 +116,7 @@ void MapperGLCanvas::keyPressEvent(QKeyEvent* event) p.y += yMove; quad.setVertex(current, p); - draw(); + updateGL(); } void MapperGLCanvas::paintEvent(QPaintEvent* event) diff --git a/main.cpp b/main.cpp index 88b9c7a..c3aed0f 100644 --- a/main.cpp +++ b/main.cpp @@ -30,6 +30,9 @@ int main(int argc, char *argv[]) splitter.addWidget(&sourceCanvas); splitter.addWidget(&destinationCanvas); + sourceCanvas.setFocusPolicy(Qt::ClickFocus); + destinationCanvas.setFocusPolicy(Qt::ClickFocus); + splitter.setWindowTitle(QObject::tr("Libremapping")); splitter.resize(640, 480); splitter.show();