New Features #1

Open
marvinelsen wants to merge 76 commits from develop into main
Showing only changes of commit 47d53d4df8 - Show all commits

View File

@ -44,15 +44,13 @@ internal class EntryCell : ListCell<DictionaryEntryFx?>() {
init {
text = null
if (item != null) {
contextMenu = createContextMenuForEntry(item!!)
}
}
override fun updateItem(entry: DictionaryEntryFx?, empty: Boolean) {
super.updateItem(entry, empty)
if (empty || entry == null) {
graphic = null
contextMenu = null
} else {
labelHeadword.text = entry.traditionalProperty.value
labelPronunciation.text = entry.pinyinWithToneMarksProperty.value
@ -60,6 +58,7 @@ internal class EntryCell : ListCell<DictionaryEntryFx?>() {
val definition = entry.definitions.joinToString(separator = " / ") { it.joinToString(separator = "; ") }
labelDefinition.text = definition
contextMenu = createContextMenuForEntry(entry)
graphic = root
}
}