Skip to content

Commit

Permalink
Merge branch 'main' into support_transmission_in_SS_to_glTF_translati…
Browse files Browse the repository at this point in the history
…on_1599
  • Loading branch information
jstone-lucasfilm authored Sep 29, 2024
2 parents a6479ae + 76bef70 commit dfa8420
Show file tree
Hide file tree
Showing 3 changed files with 143 additions and 45 deletions.
9 changes: 9 additions & 0 deletions source/MaterialXGraphEditor/Graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3240,6 +3240,15 @@ void Graph::graphButtons()
ImGui::BeginChild("Selection", ImVec2(paneWidth, 0), false, windowFlags);
ImVec2 windowPos = ImGui::GetWindowPos();

// Update cursorInRenderView to account for other windows overlapping the Render View (e.g. Menu dropdown).
cursorInRenderView &= ImGui::IsWindowHovered(ImGuiHoveredFlags_None);

// Update cursorInRenderView to account for visible scrollbar and scroll amount.
ImGuiContext* context = ImGui::GetCurrentContext();
bool hasScrollbar = context->CurrentWindow->ScrollbarY;
cursorInRenderView &= hasScrollbar ? mousePos.x < (tempWindowPos.x + screenSize.x - ImGui::GetStyle().ScrollbarSize) : true;
cursorInRenderView &= hasScrollbar ? mousePos.y < (tempWindowPos.y + screenSize.y - ImGui::GetScrollY()) : true;

// RenderView window
ImVec2 wsize = ImVec2((float) _renderer->getViewWidth(), (float) _renderer->getViewHeight());
_renderer->setViewWidth((int) screenSize[0]);
Expand Down
Loading

0 comments on commit dfa8420

Please sign in to comment.