﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
24845	[HiDPI] Native Scale button in Layer List does not trigger 1:1 zoom (ScaleFactor remains > 1.0)	DressyPear4	team	"Environment:

OS: Windows with HiDPI display scaling enabled (e.g., 125%)

Java2D Transform: 1.25x1.25

Description:
Under HiDPI scaling (125%), toggling the ""scale follows native resolution of this layer"" button (NativeScaleLayerCheckBox) in the Layers panel sets the layer as NativeScaleLayer, but fails to recalculate the map view zoom factor. Consequently, the layer's ScaleFactor remains around ~1.426, causing Java2D to resample and render the tiles blurry.

In contrast, selecting ""Zoom to native resolution"" (ZoomToNativeLevelAction) from the layer context menu properly executes mapView.zoomToFactor(Math.sqrt(scaleFactor)). This forces ScaleFactor down to 1.0 (true 1:1 pixel rendering), producing a crisp display.
It also occurs in dialogs with SplitMapChooserDialog.

Steps to Reproduce:

Set Windows display scaling to 125%.

Open JOSM and load a TMS imagery layer (e.g., OpenStreetMap Carto).

Click the Native Scale column icon in the Layers panel.

Observed: Imagery remains blurry (ScaleFactor ≈ 1.426).

Right-click the imagery layer and select Zoom to native resolution.

Observed: Imagery becomes sharp (ScaleFactor ≈ 1.0).


Diagnostic Log:

-- INITIAL / AFTER TOGGLING LAYER LIST BUTTON (Blurry) --
HiDPI OS Scale: 125%
MapView Java2D Transform: 1.25x1.25
MapView.getScale(): 5.0
Layer ScaleFactor: 1.4264201857048473
Calculated Native Factor: 1.1943283408279515

-- AFTER EXECUTING 'Zoom to native resolution' (Crisp 1:1) --
MapView.getScale(): 5.971641704139757
Layer ScaleFactor: 0.9999999999994497 (~1.0)
Calculated Native Factor: 0.9999999999997248"	defect	new	normal		Core				
