diff --git a/src/meshlab/glarea.cpp b/src/meshlab/glarea.cpp index e165f4e08..b39161804 100644 --- a/src/meshlab/glarea.cpp +++ b/src/meshlab/glarea.cpp @@ -24,6 +24,9 @@ History $Log$ +Revision 1.75 2006/01/19 23:11:39 glvertex +No significant changes + Revision 1.74 2006/01/17 16:35:27 glvertex Added Scalable fonts @@ -487,7 +490,7 @@ void GLArea::paintGL() glPopAttrib(); glPopMatrix(); } - + trackball.center=Point3f(0, 0, 0); trackball.radius= 1; trackball.GetView(); @@ -644,21 +647,24 @@ Trackball::Button QT2VCG(Qt::MouseButton qtbt, Qt::KeyboardModifiers modifiers) void GLArea::keyPressEvent ( QKeyEvent * e ) { + e->ignore(); //currentButton=GLArea::BUTTON_NONE; - if (e->key ()==Qt::Key_Shift) currentButton|=GLArea::KEY_SHIFT; - if (e->key ()==Qt::Key_Control) currentButton|=GLArea::KEY_CTRL; - if (e->key ()==Qt::Key_Alt) currentButton|=GLArea::KEY_ALT; + if (e->key ()==Qt::Key_Shift) {currentButton|=GLArea::KEY_SHIFT;e->accept();} + if (e->key ()==Qt::Key_Control) {currentButton|=GLArea::KEY_CTRL; e->accept();} + if (e->key ()==Qt::Key_Alt) {currentButton|=GLArea::KEY_ALT; e->accept();} } void GLArea::keyReleaseEvent ( QKeyEvent * e ) { - if (e->key()==Qt::Key_Shift) currentButton-=GLArea::KEY_SHIFT; - if (e->key()==Qt::Key_Control) currentButton-=GLArea::KEY_CTRL; - if (e->key()==Qt::Key_Alt) currentButton-=GLArea::KEY_ALT; + e->ignore(); + if (e->key()==Qt::Key_Shift) {currentButton-=GLArea::KEY_SHIFT;e->accept();} + if (e->key()==Qt::Key_Control) {currentButton-=GLArea::KEY_CTRL;e->accept();} + if (e->key()==Qt::Key_Alt) {currentButton-=GLArea::KEY_ALT;e->accept();} } void GLArea::mousePressEvent(QMouseEvent*e) { + e->accept(); trackball.MouseDown(e->x(),height()-e->y(), QT2VCG(e->button(), e->modifiers() ) ); update(); } diff --git a/src/meshlab/mainwindow_Init.cpp b/src/meshlab/mainwindow_Init.cpp index f80ef4be1..5e1fdb73f 100644 --- a/src/meshlab/mainwindow_Init.cpp +++ b/src/meshlab/mainwindow_Init.cpp @@ -24,6 +24,9 @@ History $Log$ +Revision 1.43 2006/01/19 23:11:39 glvertex +No significant changes + Revision 1.42 2006/01/19 15:58:59 fmazzant moved savemaskexporter to mainwindows @@ -224,14 +227,14 @@ void MainWindow::createActions() connect(windowsCascadeAct, SIGNAL(triggered()), workspace, SLOT(cascade())); windowsNextAct = new QAction(tr("&Next"), this); - windowsNextAct->setShortcutContext(Qt::ApplicationShortcut); + //windowsNextAct->setShortcutContext(Qt::ApplicationShortcut); windowsNextAct->setShortcut(Qt::CTRL+Qt::Key_Tab); - connect(windowsNextAct, SIGNAL(triggered()), workspace, SLOT(activateNextWindow())); + //connect(windowsNextAct, SIGNAL(triggered()), workspace, SLOT(activateNextWindow())); closeAct = new QAction(tr("Cl&ose"), this); - closeAct->setShortcutContext(Qt::ApplicationShortcut); + //closeAct->setShortcutContext(Qt::ApplicationShortcut); closeAct->setShortcut(Qt::CTRL+Qt::Key_F4); - connect(closeAct, SIGNAL(triggered()),workspace, SLOT(closeActiveWindow())); + //connect(closeAct, SIGNAL(triggered()),workspace, SLOT(closeActiveWindow())); closeAllAct = new QAction(tr("Close &All"), this); connect(closeAllAct, SIGNAL(triggered()),workspace, SLOT(closeAllWindows())); diff --git a/src/meshlab/mainwindow_RunTime.cpp b/src/meshlab/mainwindow_RunTime.cpp index 6fd51a0a1..aecc6a74e 100644 --- a/src/meshlab/mainwindow_RunTime.cpp +++ b/src/meshlab/mainwindow_RunTime.cpp @@ -24,6 +24,9 @@ History $Log$ +Revision 1.75 2006/01/19 23:11:39 glvertex +No significant changes + Revision 1.74 2006/01/19 15:58:59 fmazzant moved savemaskexporter to mainwindows @@ -594,7 +597,9 @@ void MainWindow::fullScreen(){ } } void MainWindow::keyPressEvent(QKeyEvent *e){ - if(e->key()==Qt::Key_Escape && isFullScreen()){ + if(e->key()==Qt::Key_Escape && isFullScreen()) + { + e->accept(); menuBar()->show(); restoreState(toolbarState); setWindowState(windowState()^ Qt::WindowFullScreen); @@ -606,4 +611,6 @@ void MainWindow::keyPressEvent(QKeyEvent *e){ } fullScreenAct->setChecked(false); } + else + e->ignore(); } \ No newline at end of file