Bug 513703

Summary: Overview Docker is not updated when the layer's state is changed via script
Product: [Applications] krita Reporter: Yu-Hsuan Lai <raincolee>
Component: ScriptingAssignee: Krita Bugs <krita-bugs-null>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.2.13   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Yu-Hsuan Lai 2025-12-22 15:01:53 UTC
SUMMARY
Overview Docker isn't updated when the layer's state is changed via script. For example, when the layer's visibility is changed by node.setVisible() (instead of calling an action)

STEPS TO REPRODUCE
1. Open Krita, create a new layer and put some brush strokes
2. Make sure Overview Docker is visible
3. Run this script via Scripter:
```
app = Krita.instance()
doc = app.activeDocument()
window = app.activeWindow()
view = window.activeView()
selected_layers = view.selectedNodes()
layer = selected_layers[0]
layer.setVisible(not layer.visible())
```

OBSERVED RESULT
The layer's visibility is toggled, but the Overview Docker isn't updated

EXPECTED RESULT
The layer's visibility is toggled, and the Overview Docker is updated

SOFTWARE/OS VERSIONS
Krita

 Version: 5.2.13 (git 6d3651a)
 Installation type: installer / portable package
 Hidpi: true

Qt

  Version (compiled): 5.15.7
  Version (loaded): 5.15.7

OS Information

  Build ABI: x86_64-little_endian-llp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: winnt
  Kernel Version: 10.0.19045
  Pretty Productname: Windows 10 Version 2009
  Product Type: windows
  Product Version: 10

ADDITIONAL INFORMATION
I know I can call "toggle_layer_visibility" action in the simplest case, but this bug makes more complicated case (like toggling a non-selected layer) annoying.