fixes 0003222: Invert zoom setting is not respected in paper/page mode
This commit is contained in:
@@ -260,7 +260,7 @@ DrawingView::DrawingView(Gui::Document* doc, QWidget* parent)
|
||||
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath
|
||||
("User parameter:BaseApp/Preferences/View");
|
||||
bool on = hGrp->GetBool("InvertZoom", false);
|
||||
bool on = hGrp->GetBool("InvertZoom", true);
|
||||
m_view->setZoomInverted(on);
|
||||
}
|
||||
|
||||
|
||||
@@ -90,6 +90,10 @@ ImageView::ImageView(QWidget* parent)
|
||||
// Create the actions, menus and toolbars
|
||||
createActions();
|
||||
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath
|
||||
("User parameter:BaseApp/Preferences/View");
|
||||
_invertZoom = hGrp->GetBool("InvertZoom", true);
|
||||
|
||||
// connect other slots
|
||||
connect(_pGLImageBox, SIGNAL(drawGraphics()), this, SLOT(drawGraphics()));
|
||||
}
|
||||
@@ -475,6 +479,9 @@ void ImageView::wheelEvent(QWheelEvent * cEvent)
|
||||
|
||||
// Zoom around centrally displayed image point
|
||||
int numTicks = cEvent->delta() / 120;
|
||||
if (_invertZoom)
|
||||
numTicks = -numTicks;
|
||||
|
||||
int ICx, ICy;
|
||||
_pGLImageBox->getCentrePoint(ICx, ICy);
|
||||
_pGLImageBox->setZoomFactor(_pGLImageBox->getZoomFactor() / pow(2.0, (double)numTicks), true, ICx, ICy);
|
||||
|
||||
@@ -128,6 +128,7 @@ protected:
|
||||
bool _statusBarEnabled;
|
||||
bool _mouseEventsEnabled;
|
||||
bool _ignoreCloseEvent;
|
||||
bool _invertZoom;
|
||||
};
|
||||
|
||||
} // namespace ImageViewGui
|
||||
|
||||
@@ -913,7 +913,7 @@ void GraphicsView3D::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::M
|
||||
_viewer->navigationStyle()->setResetCursorPosition(on);
|
||||
}
|
||||
else if (strcmp(Reason,"InvertZoom") == 0) {
|
||||
bool on = rGrp.GetBool("InvertZoom", false);
|
||||
bool on = rGrp.GetBool("InvertZoom", true);
|
||||
_viewer->navigationStyle()->setZoomInverted(on);
|
||||
}
|
||||
else if (strcmp(Reason,"ZoomAtCursor") == 0) {
|
||||
|
||||
Reference in New Issue
Block a user