Commit df54e35f authored by Bob Obara's avatar Bob Obara Committed by Kitware Robot

Merge topic 'fixingGroupViewValidityCheck'

73f85cf6 BUG: Tiled Group Views not properly reporting status
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: John Tourtellott's avatarJohn Tourtellott <john.tourtellott@kitware.com>
Merge-request: !2253
parents 0a241649 73f85cf6
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