DbViewer: added checkbox to enable Add for nodes not linked to graph

This commit is contained in:
matlabbe
2020-10-09 12:15:33 -04:00
parent 6d552b7873
commit d5572d03ad
3 changed files with 19 additions and 7 deletions

View File

@@ -360,6 +360,7 @@ DatabaseViewer::DatabaseViewer(const QString & ini, QWidget * parent) :
connect(ui_->checkBox_odomFrame, SIGNAL(stateChanged(int)), this, SLOT(updateConstraintView()));
ui_->checkBox_showOptimized->setEnabled(false);
connect(ui_->toolButton_constraint, SIGNAL(clicked(bool)), this, SLOT(editConstraint()));
connect(ui_->checkBox_enableForAll, SIGNAL(stateChanged(int)), this, SLOT(updateConstraintButtons()));
ui_->horizontalSlider_iterations->setTracking(false);
ui_->horizontalSlider_iterations->setEnabled(false);
@@ -5946,8 +5947,9 @@ void DatabaseViewer::updateConstraintButtons()
int from = ids_.at(ui_->horizontalSlider_A->value());
int to = ids_.at(ui_->horizontalSlider_B->value());
if(from!=to && from && to &&
odomPoses_.find(from) != odomPoses_.end() &&
odomPoses_.find(to) != odomPoses_.end() &&
odomPoses_.find(from) != odomPoses_.end() &&
odomPoses_.find(to) != odomPoses_.end() &&
(ui_->checkBox_enableForAll->isChecked() ||
(weights_.find(from) != weights_.end() && weights_.at(from)>=0 &&
weights_.find(to) != weights_.end() && weights_.at(to)>=0)))
{

View File

@@ -61,7 +61,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>296</width>
<width>306</width>
<height>311</height>
</rect>
</property>
@@ -304,7 +304,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>296</width>
<width>306</width>
<height>311</height>
</rect>
</property>
@@ -826,7 +826,7 @@
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<width>0</width>
<height>20</height>
</size>
</property>
@@ -1024,6 +1024,16 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_enableForAll">
<property name="toolTip">
<string>Enable &quot;Add&quot; for all nodes (even not in graph)</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_reject">
<property name="text">
@@ -1038,7 +1048,7 @@
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<width>0</width>
<height>20</height>
</size>
</property>