mirror of https://github.com/vitalif/openscad
17 lines
419 B
C++
17 lines
419 B
C++
|
#include "editor.h"
|
||
|
#include "Preferences.h"
|
||
|
|
||
|
void EditorInterface::wheelEvent(QWheelEvent *event)
|
||
|
{
|
||
|
QSettings settings;
|
||
|
bool wheelzoom_enabled = Preferences::inst()->getValue("editor/ctrlmousewheelzoom").toBool();
|
||
|
if ((event->modifiers() == Qt::ControlModifier) && wheelzoom_enabled) {
|
||
|
if (event->delta() > 0)
|
||
|
zoomIn();
|
||
|
else if (event->delta() < 0)
|
||
|
zoomOut();
|
||
|
} else {
|
||
|
QWidget::wheelEvent(event);
|
||
|
}
|
||
|
}
|