Commit 77bf6de2 authored by Jan Möbius's avatar Jan Möbius

Fixed cppcheck warnings

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13336 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 0dd61841
......@@ -1011,6 +1011,7 @@ void Core::multiViewMode( int _mode ) {
default:
emit log(LOGERR,tr("Requested illegal multiview mode!"));
break;
}
}
......
......@@ -484,6 +484,7 @@ bool defaultPerspectiveProjectionMode(int _viewer){
return OpenFlipperSettings().value(entry,false).toBool();
default:
std::cerr << "defaultProjectionMode: illegal viewer id: " << _viewer << std::endl;
break;
}
return true;
......
......@@ -1714,13 +1714,12 @@ void glViewer::handleNormalNavigation( QMouseEvent* _event ) {
else if ((_event->buttons() & Qt::MidButton) || (!allowRotation_ && (_event->buttons() & Qt::LeftButton)) ) {
ACG::Vec3d translation;
double value_x, value_y;
// if start depth is 1, no object was hit when starting translation
if ( startDepth_ == 1 ) {
value_x = properties_.sceneRadius() * ((newPoint2D.x() - lastPoint2D_.x())) * 2.0 / (double) glWidth();
value_y = properties_.sceneRadius() * ((newPoint2D.y() - lastPoint2D_.y())) * 2.0 / (double) glHeight();
double value_x = properties_.sceneRadius() * ((newPoint2D.x() - lastPoint2D_.x())) * 2.0 / (double) glWidth();
double value_y = properties_.sceneRadius() * ((newPoint2D.y() - lastPoint2D_.y())) * 2.0 / (double) glHeight();
translation = ACG::Vec3d(value_x * factor, -value_y * factor, 0.0);
} else {
......
......@@ -46,9 +46,13 @@
#include <iostream>
///Constructor
ShortcutButton::ShortcutButton(QWidget* _parent) : QPushButton(_parent)
ShortcutButton::ShortcutButton(QWidget* _parent) :
QPushButton(_parent),
key_(-1),
oldKey_(-1),
checked_(false),
firstPress_(true)
{
key_ = -1;
setCheckable(true);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment