Knife cursor goes away when dragging status bar to see options #107021

Open
opened 2023-04-17 02:30:12 +02:00 by Oliver Villar · 2 comments

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 531.41

Blender Version
Broken: version: 3.5.0, branch: blender-v3.5-release, commit date: 2023-03-29 02:56, hash: 1be25cfff18b
Worked: (newest version of Blender that worked as expected)

Short description of error
While using the Knife tool, and using middle mouse click and drag to see all options within the status bar, the knife cursor changes to the edit cross cursor. This doesn't happen when using the mouse wheel to scroll through the status bar. It also doesn't happen using the Knife Active Tool, only when pressing K to launch the tool.

Exact steps for others to reproduce the error

  1. Press K in Edit Mode to launch the knife tool
  2. Move the cursor over to the status bar, where the options for the tool are shown.
  3. Middle Mouse click and drag left and right to scroll through the status bar.

Knife cursor dissappears.mp4

**System Information** Operating system: Windows-10-10.0.19044-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 531.41 **Blender Version** Broken: version: 3.5.0, branch: blender-v3.5-release, commit date: 2023-03-29 02:56, hash: `1be25cfff18b` Worked: (newest version of Blender that worked as expected) **Short description of error** While using the Knife tool, and using middle mouse click and drag to see all options within the status bar, the knife cursor changes to the edit cross cursor. This doesn't happen when using the mouse wheel to scroll through the status bar. It also doesn't happen using the Knife Active Tool, only when pressing K to launch the tool. **Exact steps for others to reproduce the error** 1. Press K in Edit Mode to launch the knife tool 2. Move the cursor over to the status bar, where the options for the tool are shown. 3. Middle Mouse click and drag left and right to scroll through the status bar. [Knife cursor dissappears.mp4](/attachments/4f4c5822-8935-4901-a9a6-2b4135ed8ac7)
Oliver Villar added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-04-17 02:30:13 +02:00
Member

Hi, thanks for the report. Can confirm with modal knife option.
Issue doesn't happen if knife is selected in toolbar.
Similar problem is seen in previous versions. Will check whether duplicate report exists.

Hi, thanks for the report. Can confirm with modal knife option. Issue doesn't happen if knife is selected in toolbar. Similar problem is seen in previous versions. Will check whether duplicate report exists.
Pratik Borhade added
Module
Modeling
Status
Confirmed
Interest
User Interface
and removed
Status
Needs Triage
labels 2023-04-17 05:49:52 +02:00
Member
void WM_cursor_modal_set(wmWindow *win, int val)
{
  if (win->lastcursor == 0) {
    win->lastcursor = win->cursor;
  }
  win->modalcursor = val;
  WM_cursor_set(win, val);
}

I believe the mechanism is that in the WM_cursor_modal_set(), it only registers last_cursor one time when last_cursor is not zero (as opposed to using a stack), which in this case it's already WM_CURSOR_EDIT when called from view_pan_invoke, because the knife modal operator already saved its last_cursor there for restoring when the knife modal operator quits. So when view_pan_modal exits, it restores the cursor to WM_CURSOR_EDIT.

The tool bar logic already saves the cursor before operator is called, thus not affected.

I suggest we could use a last_cursor stack, or saving the modal cursor state inside individual operators instead of a window?

cc @ideasman42 for WM_cursor_modal_set().

``` void WM_cursor_modal_set(wmWindow *win, int val) { if (win->lastcursor == 0) { win->lastcursor = win->cursor; } win->modalcursor = val; WM_cursor_set(win, val); } ``` I believe the mechanism is that in the `WM_cursor_modal_set()`, it only registers `last_cursor` one time when `last_cursor` is not zero (as opposed to using a stack), which in this case it's already `WM_CURSOR_EDIT` when called from `view_pan_invoke`, because the knife modal operator already saved its `last_cursor` there for restoring when the knife modal operator quits. So when `view_pan_modal` exits, it restores the cursor to `WM_CURSOR_EDIT`. The tool bar logic already saves the cursor before operator is called, thus not affected. I suggest we could use a `last_cursor` stack, or saving the modal cursor state inside individual operators instead of a window? cc @ideasman42 for `WM_cursor_modal_set()`.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#107021
No description provided.