PostProcessingDialog: don't close dialog if validate failed

This commit is contained in:
matlabbe
2018-11-05 18:49:50 -05:00
parent 09a63bbc5b
commit 1784a0877f
2 changed files with 2 additions and 39 deletions

View File

@@ -105,10 +105,6 @@ void PostProcessingDialog::closeDialog ( QAbstractButton * button )
{
this->accept();
}
else
{
this->reject();
}
break;
default:
@@ -118,7 +114,7 @@ void PostProcessingDialog::closeDialog ( QAbstractButton * button )
bool PostProcessingDialog::validateForm()
{
if(!this->intraSession() && !this->interSession())
if(_ui->detectMoreLoopClosures->isChecked() && !this->intraSession() && !this->interSession())
{
QMessageBox::warning(this, tr("Configuration error"), tr("Intra-session and inter-session parameters cannot be both disabled at the same time. Please select one (or both)."));
return false;

View File

@@ -354,38 +354,5 @@
<resources>
<include location="../GuiLib.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>PostProcessingDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>PostProcessingDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
<connections/>
</ui>