Skip to content

Commit

Permalink
Fix issue / resizable image when not using viewport (use GetCursorScr…
Browse files Browse the repository at this point in the history
…eenPos)
  • Loading branch information
pthom committed Sep 15, 2024
1 parent 7230e9e commit 5ebb08f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/immvision/internal/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -504,10 +504,10 @@ namespace ImmVision
// (do not activate otherwise, this breaks the pan and thus can only be used when pan is disabled)
if (!params->PanWithMouse)
{
auto cursorPos = ImGui::GetCursorPos();
ImGui::SetCursorPos(tl);
auto cursorPos = ImGui::GetCursorScreenPos();
ImGui::SetCursorScreenPos(tl);
ImGui::InvisibleButton("##resize", zone.GetSize());
ImGui::SetCursorPos(cursorPos);
ImGui::SetCursorScreenPos(cursorPos);
}

bool isMouseHoveringWidget = ImGui::IsMouseHoveringRect(zone.Min, zone.Max);
Expand Down

0 comments on commit 5ebb08f

Please sign in to comment.