mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-14 04:10:31 +02:00
Absturz behoben
Bei Mausraddrehen kam es zu Absturz, wenn Tool nullptr, weil Zugriff auf Tool
This commit is contained in:
@@ -277,11 +277,13 @@ void PaintingArea::mouseReleaseEvent(QMouseEvent*event){
|
||||
}
|
||||
|
||||
void PaintingArea::wheelEvent(QWheelEvent*event){
|
||||
QPoint numDegrees = event->angleDelta() / 8;
|
||||
if(!numDegrees.isNull()) {
|
||||
QPoint numSteps = numDegrees / 15;
|
||||
Tool->onWheelScrolled(numSteps.y()* -1);
|
||||
}
|
||||
if(this->Tool != nullptr){
|
||||
QPoint numDegrees = event->angleDelta() / 8;
|
||||
if(!numDegrees.isNull()) {
|
||||
QPoint numSteps = numDegrees / 15;
|
||||
Tool->onWheelScrolled(numSteps.y()* -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// QPainter provides functions to draw on the widget
|
||||
|
||||
Reference in New Issue
Block a user