createHistory(theGroupID);
const std::string& aGroupID = groupNameFoldering(theGroupID, theAllowFolder);
const std::vector<ObjectPtr>& aVec = myHistory[theGroupID];
- if (aVec.size() <= theIndex)
- return aVec[aVec.size() - 1]; // too high index requested (to avoid crash in #2360)
+ //if (aVec.size() <= theIndex)
+ // return aVec[aVec.size() - 1]; // too high index requested (to avoid crash in #2360)
return aGroupID.empty() ? myHistory[theGroupID][theIndex] : myHistory[aGroupID][theIndex];
}
//********************************************************************
void ModuleBase_WidgetMultiSelector::onSelectionTypeChanged()
{
+ // Clear current selection in order to avoid updating of object browser with obsolete indexes
+ // which can appear because of results deletetion after changing a type of selection
+ QList<ModuleBase_ViewerPrsPtr> aEmptyList;
+ myWorkshop->setSelected(aEmptyList);
+
updateSelectionModesAndFilters(true);
myWorkshop->selectionActivate()->updateSelectionModes();