Skip to content

Commit

Permalink
Add Tab Selection
Browse files Browse the repository at this point in the history
  • Loading branch information
sotasan committed May 11, 2022
1 parent dca66c8 commit 9bc2598
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group = "net.pryoscode"
version = "0.1.7"
version = "0.1.8"

kotlin {
jvmToolchain {
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/net/pryoscode/decompiler/window/Window.kt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Window(args: Array<String>) : Stage() {
"}"
).toByteArray()))

title = "Decompiler v" + javaClass.`package`.specificationVersion
title = "Decompiler v" + (javaClass.`package`.specificationVersion ?: "0.0.0")
scene = Scene(root, 896.0, 560.0)
icons.add(Image(javaClass.classLoader.getResourceAsStream("icons/logo.png")))
show()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ class Container : TabPane() {
}

fun open(entry: Entry) {
var found = false
for (tab in tabs) {
val preview = tab as Preview
if (preview.entry == entry)
found = true
var tab: Preview? = null
for (t in tabs) {
if ((t as Preview).entry == entry) {
tab = t
break
}
}
if (!found)
if (tab == null)
Decompiler(this, entry)
else
selectionModel.select(tab)
}

}
Binary file modified src/main/resources/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9bc2598

Please sign in to comment.