Skip to content

Commit baf1572

Browse files
committed
exclude widgets with default mouse interaction
1 parent c5bf703 commit baf1572

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/polyscope.cpp

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -319,18 +319,20 @@ void processInputEvents() {
319319
}
320320

321321
bool widgetCapturedMouse = false;
322-
for (WeakHandle<Widget> wHandle : state::widgets) {
323-
if (wHandle.isValid()) {
324-
Widget& w = wHandle.get();
325-
widgetCapturedMouse = w.interact();
326-
if (widgetCapturedMouse) {
327-
break;
328-
}
329-
}
330-
}
331322

332323
// Handle scroll events for 3D view
333324
if (state::doDefaultMouseInteraction) {
325+
326+
for (WeakHandle<Widget> wHandle : state::widgets) {
327+
if (wHandle.isValid()) {
328+
Widget& w = wHandle.get();
329+
widgetCapturedMouse = w.interact();
330+
if (widgetCapturedMouse) {
331+
break;
332+
}
333+
}
334+
}
335+
334336
if (!io.WantCaptureMouse && !widgetCapturedMouse) {
335337
double xoffset = io.MouseWheelH;
336338
double yoffset = io.MouseWheel;

0 commit comments

Comments
 (0)