Преглед на файлове

Don't synchronize the axes in real time

Right now the axes are modified inside the Render
function. Setting the new axes to the other view would
then generate some OpenGL context switch.
Julien Finet преди 14 години
родител
ревизия
871862a42f
променени са 2 файла, в които са добавени 5 реда и са изтрити 3 реда
  1. 2 0
      Libs/Visualization/VTK/Widgets/ctkVTKScalarsToColorsWidget.h
  2. 3 3
      Libs/Visualization/VTK/Widgets/ctkVTKVolumePropertyWidget.cpp

+ 2 - 0
Libs/Visualization/VTK/Widgets/ctkVTKScalarsToColorsWidget.h

@@ -67,6 +67,8 @@ public slots:
   void setYRange(double min, double max);
 
 signals:
+  /// Be carefull, axesModified() can be fired inside the Render() function
+  /// of the view. You might want to connect the slot using Qt::QueuedConnection
   void axesModified();
 
 protected slots:

+ 3 - 3
Libs/Visualization/VTK/Widgets/ctkVTKVolumePropertyWidget.cpp

@@ -93,11 +93,11 @@ void ctkVTKVolumePropertyWidgetPrivate::setupUi(QWidget* widget)
   this->ScalarOpacityThresholdWidget->setVisible(false);
 
   QObject::connect(this->ScalarOpacityWidget, SIGNAL(axesModified()),
-                   q, SLOT(onAxesModified()));//, Qt::QueuedConnection);
+                   q, SLOT(onAxesModified()), Qt::QueuedConnection);
   QObject::connect(this->ScalarColorWidget, SIGNAL(axesModified()),
-                   q, SLOT(onAxesModified()));//, Qt::QueuedConnection);
+                   q, SLOT(onAxesModified()), Qt::QueuedConnection);
   QObject::connect(this->GradientWidget, SIGNAL(axesModified()),
-                   q, SLOT(onAxesModified()));//, Qt::QueuedConnection);
+                   q, SLOT(onAxesModified()), Qt::QueuedConnection);
 
   this->GradientGroupBox->setCollapsed(true);
   this->AdvancedGroupBox->setCollapsed(true);