resize&shortcuts #25

Manually merged
CodeSteak merged 16 commits from resize into master 2019-06-12 19:11:15 +02:00
3 changed files with 13 additions and 1 deletions
Showing only changes of commit b1052fa894 - Show all commits
client/src/main/kotlin/org/hso/texturesyncclient

View File

@ -37,8 +37,9 @@ class RootController : Controller() {
private lateinit var con: Connection
private lateinit var selectedTexture: Texture
private var lastExportDir: String = System.getProperty("user.home")
lateinit var selectedTexture: Texture
fun isSelectedTextureInitialized() = ::selectedTexture.isInitialized
/**
* calculate the resolution, get today's date -> upload to server

View File

@ -86,6 +86,10 @@ class MainView : View("TextureSync") {
shortcut("Ctrl+I") {
mvc.btnImportAction()
}
shortcut("Ctrl+E") {
mvc.scExport()
}
}
}

View File

@ -60,6 +60,7 @@ class MainViewController : Controller() {
folderView.children.clear()
mv.cvSearch.isDisable = true
setPreview3DTexture(Image("icons/TextureSync_Icon_256x256.jpeg")) // reset the 3DPreview to the logo
// TODO should we clear the selectedTexture?
runAsync {
rootc.queryElements(tags)
@ -89,4 +90,10 @@ class MainViewController : Controller() {
}
}
fun scExport() {
if (rootc.isSelectedTextureInitialized()) {
rootc.exportTexture(rootc.selectedTexture)
}
}
}