Commit 73f85cf6 authored by Bob Obara's avatar Bob Obara

BUG: Tiled Group Views not properly reporting status

isValid was only looking at children views in Tabs.  Also need to properly connect a childView's
modified signal to the view's childModified slot for tiled and box styles.

There was also an issue with qtAttribteView returning an incorrect not valid when the underlying
association widget is hidden (cause there are no attributes in the list) but its marked as invalid
cause that was status based on the last attribute deleted.
parent 2f84282e
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
......@@ -1458,7 +1458,7 @@ bool qtAttributeView::isValid() const
return false;
}
}
if (m_internals->AssociationsWidget != nullptr)
if ((m_internals->AssociationsWidget != nullptr) && m_internals->AssociationsWidget->isVisible())
{
return m_internals->AssociationsWidget->isValid();
}
......
......@@ -341,7 +341,21 @@ qtBaseView* qtGroupView::getChildView(int pageIndex)
bool qtGroupView::isValid() const
{
foreach (qtBaseView* childView, m_internals->m_TabbedViews)
// If the view is tabbed lets look at the tabbed views which
// is a subset of the children views which are visible tabs
// else we need to examine the children views
if (m_internals->m_style == qtGroupViewInternals::TABBED)
{
foreach (qtBaseView* childView, m_internals->m_TabbedViews)
{
if (!childView->isValid())
{
return false;
}
}
return true;
}
foreach (qtBaseView* childView, m_internals->m_ChildViews)
{
if (!childView->isValid())
{
......@@ -534,6 +548,7 @@ void qtGroupView::addGroupBoxEntry(qtBaseView* child)
{
return;
}
QObject::connect(child, &qtBaseView::modified, this, &qtGroupView::childModified);
smtk::extension::qtCollapsibleGroupWidget* gw = new qtCollapsibleGroupWidget(frame);
this->Widget->layout()->addWidget(gw);
gw->setName(child->getObject()->label().c_str());
......@@ -548,6 +563,7 @@ void qtGroupView::addTileEntry(qtBaseView* child)
{
return;
}
QObject::connect(child, &qtBaseView::modified, this, &qtGroupView::childModified);
QLabel* label = new QLabel(child->getObject()->label().c_str(), this->Widget);
m_internals->m_Labels.append(label);
QFont titleFont;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment