mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37:46 +08:00
GUI: Fixing some minor Export dialog bugs (texture option disabled on export or failing to save mesh without extension set)
This commit is contained in:
@@ -145,10 +145,13 @@ void ExportCloudsDialog::updateMLSGrpVisibility()
|
|||||||
_ui->groupBox_4->setVisible(_ui->comboBox_upsamplingMethod->currentIndex() == 3);
|
_ui->groupBox_4->setVisible(_ui->comboBox_upsamplingMethod->currentIndex() == 3);
|
||||||
_ui->groupBox_5->setVisible(_ui->comboBox_upsamplingMethod->currentIndex() == 4);
|
_ui->groupBox_5->setVisible(_ui->comboBox_upsamplingMethod->currentIndex() == 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExportCloudsDialog::updateTexturingAvailability()
|
void ExportCloudsDialog::updateTexturingAvailability()
|
||||||
{
|
{
|
||||||
_ui->checkBox_textureMapping->setEnabled(!_ui->checkBox_assemble->isChecked() || _ui->checkBox_binary->isVisible());
|
updateTexturingAvailability(_ui->checkBox_binary->isVisible());
|
||||||
|
}
|
||||||
|
void ExportCloudsDialog::updateTexturingAvailability(bool isExporting)
|
||||||
|
{
|
||||||
|
_ui->checkBox_textureMapping->setEnabled(!_ui->checkBox_assemble->isChecked() || isExporting);
|
||||||
_ui->label_textureMapping->setEnabled(_ui->checkBox_textureMapping->isEnabled());
|
_ui->label_textureMapping->setEnabled(_ui->checkBox_textureMapping->isEnabled());
|
||||||
_ui->doubleSpinBox_meshDecimationFactor->setEnabled(!_ui->checkBox_textureMapping->isEnabled() || !_ui->checkBox_textureMapping->isChecked());
|
_ui->doubleSpinBox_meshDecimationFactor->setEnabled(!_ui->checkBox_textureMapping->isEnabled() || !_ui->checkBox_textureMapping->isChecked());
|
||||||
_ui->label_meshDecimation->setEnabled(_ui->doubleSpinBox_meshDecimationFactor->isEnabled());
|
_ui->label_meshDecimation->setEnabled(_ui->doubleSpinBox_meshDecimationFactor->isEnabled());
|
||||||
@@ -377,7 +380,7 @@ void ExportCloudsDialog::setSaveButton()
|
|||||||
_ui->checkBox_mesh_quad->setVisible(false);
|
_ui->checkBox_mesh_quad->setVisible(false);
|
||||||
_ui->checkBox_mesh_quad->setEnabled(false);
|
_ui->checkBox_mesh_quad->setEnabled(false);
|
||||||
_ui->label_quad->setVisible(false);
|
_ui->label_quad->setVisible(false);
|
||||||
updateTexturingAvailability();
|
updateTexturingAvailability(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExportCloudsDialog::setOkButton()
|
void ExportCloudsDialog::setOkButton()
|
||||||
@@ -389,7 +392,7 @@ void ExportCloudsDialog::setOkButton()
|
|||||||
_ui->checkBox_mesh_quad->setVisible(true);
|
_ui->checkBox_mesh_quad->setVisible(true);
|
||||||
_ui->checkBox_mesh_quad->setEnabled(true);
|
_ui->checkBox_mesh_quad->setEnabled(true);
|
||||||
_ui->label_quad->setVisible(true);
|
_ui->label_quad->setVisible(true);
|
||||||
updateTexturingAvailability();
|
updateTexturingAvailability(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExportCloudsDialog::enableRegeneration(bool enabled)
|
void ExportCloudsDialog::enableRegeneration(bool enabled)
|
||||||
@@ -435,7 +438,7 @@ void ExportCloudsDialog::exportClouds(
|
|||||||
else if(meshes.size())
|
else if(meshes.size())
|
||||||
{
|
{
|
||||||
bool exportMeshes = true;
|
bool exportMeshes = true;
|
||||||
if(_ui->checkBox_textureMapping->isChecked())
|
if(_ui->checkBox_textureMapping->isEnabled() && _ui->checkBox_textureMapping->isChecked())
|
||||||
{
|
{
|
||||||
QMessageBox::StandardButton r = QMessageBox::warning(this, tr("Exporting Texture Mesh"),
|
QMessageBox::StandardButton r = QMessageBox::warning(this, tr("Exporting Texture Mesh"),
|
||||||
tr("No texture mesh could be created, do you want to continue with saving only the meshes (%1)?").arg(meshes.size()),
|
tr("No texture mesh could be created, do you want to continue with saving only the meshes (%1)?").arg(meshes.size()),
|
||||||
@@ -1147,7 +1150,7 @@ bool ExportCloudsDialog::getExportedClouds(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// texture mesh
|
// texture mesh
|
||||||
UDEBUG("texture mapping=%d", _ui->checkBox_textureMapping->isChecked()?1:0);
|
UDEBUG("texture mapping=%d", _ui->checkBox_textureMapping->isEnabled() && _ui->checkBox_textureMapping->isChecked()?1:0);
|
||||||
if(_ui->checkBox_textureMapping->isEnabled() && _ui->checkBox_textureMapping->isChecked())
|
if(_ui->checkBox_textureMapping->isEnabled() && _ui->checkBox_textureMapping->isChecked())
|
||||||
{
|
{
|
||||||
QDir dir(workingDirectory);
|
QDir dir(workingDirectory);
|
||||||
@@ -1672,7 +1675,8 @@ void ExportCloudsDialog::saveMeshes(
|
|||||||
{
|
{
|
||||||
path += ".ply";
|
path += ".ply";
|
||||||
}
|
}
|
||||||
else if(QFileInfo(path).suffix() == "ply")
|
|
||||||
|
if(QFileInfo(path).suffix() == "ply")
|
||||||
{
|
{
|
||||||
if(binaryMode)
|
if(binaryMode)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ private:
|
|||||||
void setSaveButton();
|
void setSaveButton();
|
||||||
void setOkButton();
|
void setOkButton();
|
||||||
void enableRegeneration(bool enabled);
|
void enableRegeneration(bool enabled);
|
||||||
|
void updateTexturingAvailability(bool isExporting);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui_ExportCloudsDialog * _ui;
|
Ui_ExportCloudsDialog * _ui;
|
||||||
|
|||||||
Reference in New Issue
Block a user