Selaa lähdekoodia

ENH: Reconnecting an object of a different type is not an error

If the previous and the new items derive from the same class and if they
both fire the same event, then it is not a problem. Print some debug info
just in case it's not what the developer meant to do.
Julien Finet 15 vuotta sitten
vanhempi
commit
fd65ca0f68
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 3 3
      Libs/Visualization/VTK/Core/ctkVTKObjectEventsObserver.cpp

+ 3 - 3
Libs/Visualization/VTK/Core/ctkVTKObjectEventsObserver.cpp

@@ -104,9 +104,9 @@ QString ctkVTKObjectEventsObserver::addConnection(vtkObject* old_vtk_obj, vtkObj
     // Check that old_object and new_object are the same type
     if (vtk_obj && !vtk_obj->IsA(old_vtk_obj->GetClassName()))
       {
-      qCritical() << "Old vtkObject (type:" << old_vtk_obj->GetClassName() << ") to disconnect and "
-                  << "the new VtkObject (type:" << vtk_obj->GetClassName() << ") to connect"
-                  << "should have the same type.";
+      qDebug() << "Previous vtkObject (type:" << old_vtk_obj->GetClassName() << ") to disconnect"
+               << "and new vtkObject (type:" << vtk_obj->GetClassName() << ") to connect"
+               << "have a different type.";
       return connectionId;
       }
     // Disconnect old vtkObject