﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
12394	[patch] native file chooser was empty when setSelectedFile existed	kolesar	team	"Native file chooser behaved differently from Swing file chooser. When setSelectedFile was called with a filename that already existed it was displaying with no selected directory.

This affected #12392 that offered default filename for saving and was working fine with Swing file chooser. Also affected MapPaintDialog save function that did the same. In tested JOSM version you can check this bug by saving a style using suggested filename and then saving it again. Second time (when file created last time still exists) dialog is empty.

NativeFileChooser.setSelectedFile() called `.setDirectory(file.getAbsolutePath())` but this path still contained the file name that confused java.awt.FileDialog. Replaced with `.setDirectory(file.getParent())` that gives path without filename.

Also made setSelectedFile(File file) null-safe similar to Swing method."	defect	closed	normal	16.02	Core		fixed		
