Salome HOME
Copyright update 2022
[modules/gui.git] / src / SVTK / SVTK_ViewParameterDlg.cxx
old mode 100755 (executable)
new mode 100644 (file)
index f686464..9ae0133
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -54,12 +54,12 @@ SVTK_ViewParameterDlg::SVTK_ViewParameterDlg(QtxAction* theAction,
                                              const char* theName):
   ViewerTools_DialogBase(theAction, theParent, theName),
   myMainWindow(theParent),
+  myRWInteractor(theParent->GetInteractor()),
   myPriority(0.0),
-  myEventCallbackCommand(vtkCallbackCommand::New()),
-  myRWInteractor(theParent->GetInteractor())
+  myEventCallbackCommand(vtkCallbackCommand::New())
 {
   setWindowTitle(tr("DLG_TITLE"));
-  setSizeGripEnabled(TRUE);
+  setSizeGripEnabled(true);
 
   // Top layout
   QVBoxLayout* aTopLayout = new QVBoxLayout(this);
@@ -349,7 +349,7 @@ SVTK_ViewParameterDlg::SVTK_ViewParameterDlg(QtxAction* theAction,
 
   QPushButton* m_bClose = new QPushButton(tr("&Close"), aGroupBox );
   m_bClose->setObjectName("m_bClose");
-  m_bClose->setAutoDefault(TRUE);
+  m_bClose->setAutoDefault(true);
   m_bClose->setFixedSize(m_bClose->sizeHint());
   connect(m_bClose, SIGNAL(clicked()), this, SLOT(onClickClose()));
 
@@ -494,14 +494,14 @@ void SVTK_ViewParameterDlg::setEnabled(QFrame* theWidget, const bool theState)
   
 }
 
-void SVTK_ViewParameterDlg::onProjectionModeChanged(int mode)
+void SVTK_ViewParameterDlg::onProjectionModeChanged(int /*mode*/)
 {
   int aBtn = myProjectionMode->checkedId();
 
   vtkCamera* aCamera = myRWInteractor->getRenderer()->GetActiveCamera();
   aCamera->SetParallelProjection(aBtn == 0);
-
-  myMainWindow->activateProjectionMode(aBtn);
+  if (!myBusy)
+    myMainWindow->activateProjectionMode(!aBtn);
 
   // update view
   myRWInteractor->GetDevice()->CreateTimer(VTKI_TIMER_FIRST);
@@ -516,7 +516,7 @@ void SVTK_ViewParameterDlg::onProjectionModeChanged(int mode)
   }
 }
 
-void SVTK_ViewParameterDlg::onPositionModeChanged(int mode)
+void SVTK_ViewParameterDlg::onPositionModeChanged(int /*mode*/)
 {
   setEnabled(myCameraCoords, myCameraPositionMode->checkedId() == 0);
 }