Skip to content
Snippets Groups Projects
Commit bfef16db authored by Gatien Ferret's avatar Gatien Ferret
Browse files

[hack][fix] Make pcap reader start at frame idx 0 instead of 1

Note : a fix in the LidarReader would be a more suitable long term solution
parent 14e087ce
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,8 @@
#include <vtkSMProxy.h>
#include <pqActiveObjects.h>
#include <pqAnimationManager.h>
#include <pqAnimationScene.h>
#include <pqPVApplicationCore.h>
#include <pqObjectBuilder.h>
#include <pqPipelineSource.h>
......@@ -169,6 +171,7 @@ void lqOpenPcapReaction::createSourceFromFile(QString fileName)
if (posOrSource)
{
posOrSource->updatePipeline();
posOrName = posOrSource->getSMName();
controller->Show(posOrSource->getSourceProxy(), 0, view->getViewProxy());
}
......@@ -191,7 +194,17 @@ void lqOpenPcapReaction::createSourceFromFile(QString fileName)
// Show the trailing frame
controller->Show(trailingFrameFilter->getSourceProxy(), 0, view->getViewProxy());
pqActiveObjects::instance().setActiveSource(trailingFrameFilter);
pqApplicationCore::instance()->render();
// WIP Workaround Seek to first Frame To prevent displaying half frame from begining
pqAnimationScene* animScene = pqPVApplicationCore::instance()->animationManager()->getActiveScene();
if(animScene){
QList<double> timesteps = animScene->getTimeSteps();
if(!timesteps.empty()){
animScene->setAnimationTime(timesteps.first());
}
}
// Remove the handler so the user can interact with VeloView again (pushing any button)
handler->RemoveObserver(tag);
handler->LocalCleanupPendingProgress();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment