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)
{
if (this->button3down)
return;
SbBool zoomAtCur = this->zoomAtCursor;
if (zoomAtCur) {
const SbViewportRegion & vp = viewer->getViewportRegion();

View File

@ -74,6 +74,7 @@
# include <Inventor/VRMLnodes/SoVRMLGroup.h>
# include <QEventLoop>
# include <QKeyEvent>
# include <QWheelEvent>
# include <QMessageBox>
# include <QTimer>
# include <QStatusBar>
@ -1033,6 +1034,14 @@ void View3DInventorViewer::selectAll()
*/
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) {
QKeyEvent* ke = static_cast<QKeyEvent*>(event);
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();
if (obj->getTypeId().isDerivedFrom(meshId)) {
const MeshObject& mesh = static_cast<Mesh::Feature*>(obj)->Mesh.getValue();
MeshCore::MeshKernel kernel = mesh.getKernel();
kernel.Transform(mesh.getTransform());
if (global_mesh.countFacets() == 0)
global_mesh = mesh;
global_mesh.setKernel(kernel);
else
global_mesh.addMesh(mesh);
global_mesh.addMesh(kernel);
}
else if (obj->getTypeId().isDerivedFrom(partId)) {
App::Property* shape = obj->getPropertyByName("Shape");