Skip to content

Commit

Permalink
Forgot to add new selection highlight to second selection box.
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveMaas1978 committed Jan 30, 2025
1 parent 97300ce commit 9b2f0fc
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions FEBioStudio/ModelPropsPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1433,7 +1433,27 @@ void CModelPropsPanel::on_select1_currentItemChanged(int nrow)

void CModelPropsPanel::on_select2_currentItemChanged(int nrow)
{
CModelDocument* pdoc = m_wnd->GetModelDocument();
if ((pdoc == nullptr) || !pdoc->IsValid()) return;

FSItemListBuilder* itemList = ui->sel2->GetItemList();
if (itemList)
{
std::vector<int> allItems;
ui->sel2->getAllItems(allItems);

std::vector<int> l;
if (!ui->sel2->isCollapsed()) l = allItems;
else
{
if ((nrow >= 0) && (nrow < allItems.size())) l.push_back(allItems[nrow]);
}

if (!l.empty())
{
emit itemSelected(itemList, l);
}
}
}

void CModelPropsPanel::PickSelection(int n)
Expand Down

0 comments on commit 9b2f0fc

Please sign in to comment.