Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 64216d9c authored by Jule Marcoueille's avatar Jule Marcoueille
Browse files

Tentative d'ajout de la combinaison Ctrl + touche de zoom

(handler sur les touches raccourcis de l'interface donc ca ne marche pas encore, pas encore trouve l'astuce pour contourner ca)
parent 63217bed
Branches
Tags
No related merge requests found
......@@ -665,6 +665,20 @@ void Render_opengl::keyPressEvent(QKeyEvent * event){
*/
change_translate_y(-1*ctrl_factor);
break;
case Qt::Key_Plus:
/*
* Key 'plus' pressed.
*/
if (ctrl_factor != 1)
change_scale(1*ctrl_factor);
break;
case Qt::Key_Minus:
/*
* Key 'minus' pressed.
*/
if (ctrl_factor != 1)
change_scale(-1*ctrl_factor);
break;
default:
/*
* Unknow key pressed.
......
......@@ -154,6 +154,11 @@ class Render_opengl : public QGLWidget, public Render
* \brief Define the scrolling factor when CTRL key is pressed.
*/
static const int _ctrl_scroll_factor = 10;
/*!
* \brief Define the scrolling factor when CTRL key is pressed.
*/
static const int _ctrl_zoom_factor = 3;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment