Fattorino / ImNodeFlow

Node based editor/blueprints for ImGui
MIT License
119 stars 15 forks source link

ImFlow::ImFlowNode::update() causing window not to serialize to imgui.ini #24

Closed PapaNaxos closed 2 months ago

PapaNaxos commented 2 months ago

When calling ImFlow::ImNodeFlow::update() inside an ImGui window, that window no longer updates its position and size within imgui.ini

Minimal reproduction

static ImFlow::ImNodeFlow myGrid;
if (ImGui::Begin("Test Window"))
{
    myGrid.update();
}
ImGui::End();

Reposition/resize the "Test Window" and restart the application. The windows' new position/size will not be retained between executions.

If the call to update() is removed, the retention of the windows position/size behaves normally again.

ImGui Info
Version 1.90 WIP
Num 18993
PapaNaxos commented 2 months ago

Actually it seems to be failing to save ANYTHING to imgui.ini when I use the update() method, even the positions of other windows.

Fattorino commented 2 months ago

My only guess is that the second context for the node rendering messes ImGui up. I'll have to do some testing on my end. Such a weird bug tho

PapaNaxos commented 2 months ago

Are you able to recreate the bug on your side?

I was also a bit suspicious of the second context, but didn't look into it too deeply. What's the reason for making a second context?

Fattorino commented 2 months ago

I'll try to recreate the issue in the following days, also the second context is needed for the zoom

Fattorino commented 2 months ago

Fixed with commit 3e4ed6e5b51cc9a874480b94f112d5965b0412b0 If needed, open another issue