Skip to content

Commit 6462d44

Browse files
committed
Fix new nodes spawning at incorrect locations
1 parent 5f5ef76 commit 6462d44

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tools/NodeEditor/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ find_package(ImGui REQUIRED SourcesMiscCpp)
8282
CPMAddPackage(
8383
NAME imnodes
8484
GITHUB_REPOSITORY Auburn/imnodes
85-
GIT_TAG 26b70c528d48beeb839035f3da71550f8b0adfa7
85+
GIT_TAG db2ef1192a4ddff32a838094de7127142a731ef0
8686
GIT_SUBMODULES ".github"
8787
EXCLUDE_FROM_ALL YES
8888
OPTIONS

tools/NodeEditor/FastNoiseNodeEditor.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,7 @@ void FastNoiseNodeEditor::DoContextMenu()
13361336
ImGui::PushStyleVar( ImGuiStyleVar_WindowPadding, ImVec2( 4, 4 ) );
13371337
if( distance < 5.0f && ImGui::BeginPopupContextWindow( "new_node", 1 ) )
13381338
{
1339-
mContextStartPos = ImGui::GetMousePosOnOpeningCurrentPopup();
1339+
mContextStartPos = ImNodes::ConvertToEditorContextSpace( ImGui::GetMousePosOnOpeningCurrentPopup() );
13401340

13411341
if( auto newMetadata = mContextMetadata.front()->DrawUI() )
13421342
{
@@ -1406,7 +1406,7 @@ void FastNoiseNodeEditor::DoContextMenu()
14061406
}
14071407
if( ImGui::BeginPopup( "new_node_drop", ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoSavedSettings ) )
14081408
{
1409-
ImVec2 startPos = ImGui::GetMousePosOnOpeningCurrentPopup();
1409+
ImVec2 startPos = ImNodes::ConvertToEditorContextSpace( ImGui::GetMousePosOnOpeningCurrentPopup() );
14101410

14111411
auto newMetadata = mContextMetadata.front()->DrawUI( []( const FastNoise::Metadata* metadata )
14121412
{

0 commit comments

Comments
 (0)