Skip to content

Commit 16dd2ef

Browse files
committed
Node editor fix node title context menus
1 parent d25e043 commit 16dd2ef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/NodeEditor/FastNoiseNodeEditor.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -1048,18 +1048,19 @@ void FastNoiseNodeEditor::DoNodes()
10481048
}
10491049

10501050
ImNodes::EndNodeTitleBar();
1051+
ImGuiID popupId = ImGui::GetItemID();
10511052

10521053
if( ImGui::IsMouseReleased( ImGuiMouseButton_Right ) && ImGui::IsItemHovered( ImGuiHoveredFlags_AllowWhenBlockedByPopup ) )
10531054
{
10541055
ImGui::SetCurrentContext( mMainContext );
1055-
ImGui::OpenPopup( "node_title" );
1056+
ImGui::OpenPopup( popupId );
10561057
}
10571058

10581059
ImGui::SetCurrentContext( mMainContext );
10591060
// Right click node title to change node type
10601061
ImGui::PushStyleVar( ImGuiStyleVar_WindowPadding, ImVec2( 4, 4 ) );
10611062

1062-
if( ImGui::BeginPopup( "node_title" ) )
1063+
if( ImGui::BeginPopupEx( popupId, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoSavedSettings ) )
10631064
{
10641065
if( ImGui::MenuItem( "Copy Encoded Node Tree" ) )
10651066
{

0 commit comments

Comments
 (0)