Salome HOME
Merge from 'master'
[modules/shaper.git] / src / XGUI / XGUI_ViewWindow.cpp
index bff1e923f5451a5e8226e17ee41cc45be1f5c4da..7c0bc5d9ac14c8c9e225178db90b52ae4344bf63 100644 (file)
@@ -680,7 +680,8 @@ void XGUI_ViewWindow::vpMousePressEvent(QMouseEvent* theEvent)
 void XGUI_ViewWindow::contextMenuEvent(QContextMenuEvent* theEvent)
 {
   if (theEvent->modifiers() == Qt::NoModifier) {
-    QFrame::contextMenuEvent(theEvent);
+    // Temporary: has to be removed when viewer popup will be defined
+    //QFrame::contextMenuEvent(theEvent);
     emit contextMenuRequested(theEvent);
   }
 }
@@ -726,7 +727,7 @@ void XGUI_ViewWindow::vpMouseReleaseEvent(QMouseEvent* theEvent)
       myCurrX = theEvent->x();
       myCurrY = theEvent->y();
       drawRect();
-      QRect rect = makeRect(myStartX, myStartY, myCurrX, myCurrY);
+      QRect rect = XGUI_Tools::makeRect(myStartX, myStartY, myCurrX, myCurrY);
       if (!rect.isEmpty())
         myViewPort->fitRect(rect);
       endDrawRect();
@@ -858,7 +859,7 @@ void XGUI_ViewWindow::drawRect()
   }
 
   myRectBand->setUpdatesEnabled(false);
-  QRect aRect = makeRect(myStartX, myStartY, myCurrX, myCurrY);
+  QRect aRect = XGUI_Tools::makeRect(myStartX, myStartY, myCurrX, myCurrY);
   myRectBand->initGeometry(aRect);
 
   if (!myRectBand->isVisible())
@@ -1038,7 +1039,7 @@ void XGUI_ViewWindow::dumpView()
     QApplication::setOverrideCursor( Qt::WaitCursor );
     QImage aPicture = myViewPort->dumpView();
 
-    QString aFmt = extension(aFileName).toUpper();
+    QString aFmt = XGUI_Tools::extension(aFileName).toUpper();
     if( aFmt.isEmpty() )
       aFmt = QString( "BMP" ); // default format
     else if( aFmt == "JPG" )