MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / drawSkippedObject_

Method drawSkippedObject_

source/MRViewer/MRSceneObjectsListDrawer.cpp:430–451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

428}
429
430bool 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
453void SceneObjectsListDrawer::drawObjectVisibilityCheckbox_( Object& object, const std::string& uniqueStr )
454{

Callers

nothing calls this directly

Calls 3

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected