diff --git a/Core/Core.cc b/Core/Core.cc index f66e38b5689973ea00ef8e08b6921739428c65ba..5ab482cd2c105076d4a55b238f4b2dfa079f46a1 100644 --- a/Core/Core.cc +++ b/Core/Core.cc @@ -1011,6 +1011,7 @@ void Core::multiViewMode( int _mode ) { default: emit log(LOGERR,tr("Requested illegal multiview mode!")); + break; } } diff --git a/common/GlobalOptions.cc b/common/GlobalOptions.cc index ec5387037046c2825d8f9f8ee47f73082b5e9f17..fd62b9f075ddd53b164d2425aec43af88489b4f5 100644 --- a/common/GlobalOptions.cc +++ b/common/GlobalOptions.cc @@ -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; diff --git a/widgets/glWidget/QtBaseViewer.cc b/widgets/glWidget/QtBaseViewer.cc index b557c5cbc2fe208b5f5a4b2ef0bb5bb060a0308e..49dcbbe4c80d0f9ee8af916ba72067374bb076fc 100644 --- a/widgets/glWidget/QtBaseViewer.cc +++ b/widgets/glWidget/QtBaseViewer.cc @@ -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 { diff --git a/widgets/optionsWidget/ShortcutButton.cc b/widgets/optionsWidget/ShortcutButton.cc index a4f39779ac3c413474299200c6caabb7f96557d7..de63f2350bbf333390c3866c1a574040e93f62d6 100644 --- a/widgets/optionsWidget/ShortcutButton.cc +++ b/widgets/optionsWidget/ShortcutButton.cc @@ -46,9 +46,13 @@ #include ///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); }