| 428 | } |
| 429 | |
| 430 | bool SceneObjectsListDrawer::drawSkippedObject_( Object& object, const std::string& uniqueStr, int ) |
| 431 | { |
| 432 | const bool hasRealChildren = !object.isAncillary() && objectHasSelectableChildren( object ); |
| 433 | auto openCommandIt = sceneOpenCommands_.find( &object ); |
| 434 | bool resetOpenFlag = false; |
| 435 | if ( openCommandIt != sceneOpenCommands_.end() ) |
| 436 | { |
| 437 | resetOpenFlag = true; |
| 438 | ImGui::SetNextItemOpen( openCommandIt->second ); |
| 439 | } |
| 440 | auto res = ImGui::TreeNodeUpdateNextOpen( ImGui::GetCurrentWindow()->GetID( objectLineStrId_( object, uniqueStr ).c_str() ), |
| 441 | ( hasRealChildren ? sDefaultGroupState : 0 ) ); |
| 442 | if ( resetOpenFlag ) |
| 443 | { |
| 444 | // as far as `TreeNodeUpdateNextOpen` uses `SetNextItemOpen` but does not clear it, we clear it manually |
| 445 | auto ctx = ImGui::GetCurrentContext(); |
| 446 | ctx->NextItemData.HasFlags &= ~ImGuiNextItemDataFlags_HasOpen; |
| 447 | ctx->NextItemData.OpenVal = sDefaultGroupState; |
| 448 | ctx->NextItemData.OpenCond = ImGuiCond_None; |
| 449 | } |
| 450 | return res; |
| 451 | } |
| 452 | |
| 453 | void SceneObjectsListDrawer::drawObjectVisibilityCheckbox_( Object& object, const std::string& uniqueStr ) |
| 454 | { |
nothing calls this directly
no test coverage detected