Skip to content

Commit 72d5346

Browse files
authored
Merge pull request #369 from scenerygraphics/default-keybindings
Use default keybindings if no keybindings config file exists
2 parents 9ecb610 + ad29d00 commit 72d5346

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/sc/iview/Controls.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,10 @@ open class Controls(val sciview: SciView) {
197197
h.addKeyBinding("ruler: keep the button pressed and drag with the mouse", "E")
198198

199199
val configFile = File(System.getProperty("user.home")).resolve(".sciview.keybindings.yaml")
200-
inputHandler.readFromFile(configFile)
200+
if( configFile.exists() )
201+
inputHandler.readFromFile(configFile)
202+
else
203+
inputHandler.useDefaultBindings(configFile.absolutePath)
201204
}
202205

203206
/*

0 commit comments

Comments
 (0)