Merge branch 'master' of ssh://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad

This commit is contained in:
Yorik van Havre 2012-02-24 11:48:47 -02:00
commit d4899667bc
3 changed files with 13 additions and 4 deletions

View File

@ -715,8 +715,6 @@ void NavigationStyle::zoomByCursor(const SbVec2f & thispos, const SbVec2f & prev
void NavigationStyle::doZoom(SoCamera* camera, SbBool forward, const SbVec2f& pos) void NavigationStyle::doZoom(SoCamera* camera, SbBool forward, const SbVec2f& pos)
{ {
if (this->button3down)
return;
SbBool zoomAtCur = this->zoomAtCursor; SbBool zoomAtCur = this->zoomAtCursor;
if (zoomAtCur) { if (zoomAtCur) {
const SbViewportRegion & vp = viewer->getViewportRegion(); const SbViewportRegion & vp = viewer->getViewportRegion();

View File

@ -74,6 +74,7 @@
# include <Inventor/VRMLnodes/SoVRMLGroup.h> # include <Inventor/VRMLnodes/SoVRMLGroup.h>
# include <QEventLoop> # include <QEventLoop>
# include <QKeyEvent> # include <QKeyEvent>
# include <QWheelEvent>
# include <QMessageBox> # include <QMessageBox>
# include <QTimer> # include <QTimer>
# include <QStatusBar> # include <QStatusBar>
@ -1033,6 +1034,14 @@ void View3DInventorViewer::selectAll()
*/ */
void View3DInventorViewer::processEvent(QEvent * event) void View3DInventorViewer::processEvent(QEvent * event)
{ {
// Bug #0000607: Some mices also support horizontal scrolling which however might
// lead to some unwanted zooming when pressing the MMB for panning.
// Thus, we filter out horizontal scrolling.
if (event->type() == QEvent::Wheel) {
QWheelEvent* we = static_cast<QWheelEvent*>(event);
if (we->orientation() == Qt::Horizontal)
return;
}
if (event->type() == QEvent::KeyPress) { if (event->type() == QEvent::KeyPress) {
QKeyEvent* ke = static_cast<QKeyEvent*>(event); QKeyEvent* ke = static_cast<QKeyEvent*>(event);
if (ke->matches(QKeySequence::SelectAll)) { if (ke->matches(QKeySequence::SelectAll)) {

View File

@ -165,10 +165,12 @@ static PyObject * exporter(PyObject *self, PyObject *args)
App::DocumentObject* obj = static_cast<App::DocumentObjectPy*>(item)->getDocumentObjectPtr(); App::DocumentObject* obj = static_cast<App::DocumentObjectPy*>(item)->getDocumentObjectPtr();
if (obj->getTypeId().isDerivedFrom(meshId)) { if (obj->getTypeId().isDerivedFrom(meshId)) {
const MeshObject& mesh = static_cast<Mesh::Feature*>(obj)->Mesh.getValue(); const MeshObject& mesh = static_cast<Mesh::Feature*>(obj)->Mesh.getValue();
MeshCore::MeshKernel kernel = mesh.getKernel();
kernel.Transform(mesh.getTransform());
if (global_mesh.countFacets() == 0) if (global_mesh.countFacets() == 0)
global_mesh = mesh; global_mesh.setKernel(kernel);
else else
global_mesh.addMesh(mesh); global_mesh.addMesh(kernel);
} }
else if (obj->getTypeId().isDerivedFrom(partId)) { else if (obj->getTypeId().isDerivedFrom(partId)) {
App::Property* shape = obj->getPropertyByName("Shape"); App::Property* shape = obj->getPropertyByName("Shape");