mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
When exporting poses, set txt extension by default if not set
This commit is contained in:
@@ -2238,6 +2238,22 @@ void DatabaseViewer::exportPoses(int format)
|
||||
|
||||
if(!path.isEmpty())
|
||||
{
|
||||
if(QFileInfo(path).suffix() == "")
|
||||
{
|
||||
if(format == 3)
|
||||
{
|
||||
path += ".graph";
|
||||
}
|
||||
else if(format==4)
|
||||
{
|
||||
path += ".g2o";
|
||||
}
|
||||
else
|
||||
{
|
||||
path += ".txt";
|
||||
}
|
||||
}
|
||||
|
||||
bool saved = graph::exportPoses(path.toStdString(), format, poses, links, stamps);
|
||||
|
||||
if(saved)
|
||||
|
||||
@@ -5217,6 +5217,22 @@ void MainWindow::exportPoses(int format)
|
||||
|
||||
if(!path.isEmpty())
|
||||
{
|
||||
if(QFileInfo(path).suffix() == "")
|
||||
{
|
||||
if(format == 3)
|
||||
{
|
||||
path += ".graph";
|
||||
}
|
||||
else if(format==4)
|
||||
{
|
||||
path += ".g2o";
|
||||
}
|
||||
else
|
||||
{
|
||||
path += ".txt";
|
||||
}
|
||||
}
|
||||
|
||||
_exportPosesFileName[format] = path;
|
||||
bool saved = graph::exportPoses(path.toStdString(), format, poses, links, stamps);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user