mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2058 Context command. Minor fix
This commit is contained in:
@@ -55,18 +55,16 @@ void RicToggleItemsOnOthersOffFeature::onActionTriggered(bool isChecked)
|
||||
std::vector<caf::PdmObject*> selectedObjects;
|
||||
caf::SelectionManager::instance()->objectsByType(&selectedObjects);
|
||||
|
||||
// First toggle off all siblings
|
||||
caf::PdmFieldHandle* commonParent = commonParentForAllSelections(selectedObjects);
|
||||
|
||||
if (commonParent)
|
||||
for (caf::PdmObjectHandle* child : childObjects(commonParent))
|
||||
{
|
||||
for (caf::PdmObjectHandle* child : childObjects(commonParent))
|
||||
{
|
||||
caf::PdmField<bool>* field = objectToggleField(child);
|
||||
caf::PdmField<bool>* field = objectToggleField(child);
|
||||
|
||||
if (field)
|
||||
{
|
||||
field->setValueWithFieldChanged(false);
|
||||
}
|
||||
if (field)
|
||||
{
|
||||
field->setValueWithFieldChanged(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user