diff --git a/nextion.properties b/nextion.properties index 895ef13..3e44360 100644 --- a/nextion.properties +++ b/nextion.properties @@ -1,3 +1,3 @@ -#Sun Jan 16 20:33:21 GMT 2022 +#Tue Jan 18 13:52:34 GMT 2022 chunk_dir=C\:\\GIT-Proto\\openhab\\chunks tft_file=C\:\\GIT-Proto\\openhab\\nspanel\\ns-panel.tft diff --git a/src/systems/proto/nsflash/MakeChunksFrame.java b/src/systems/proto/nsflash/MakeChunksFrame.java index 32b5d71..3dffda1 100644 --- a/src/systems/proto/nsflash/MakeChunksFrame.java +++ b/src/systems/proto/nsflash/MakeChunksFrame.java @@ -188,6 +188,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { private void findFileBNActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_findFileBNActionPerformed JFileChooser chooser = new JFileChooser(); + if (tftFile!=null) { + chooser.setCurrentDirectory(tftFile.getParentFile()); + } int stat = chooser.showOpenDialog(this); tftFile = chooser.getSelectedFile(); fileTF.setText(tftFile.getAbsolutePath()); @@ -201,6 +204,9 @@ private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS private void findDirBNActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_findDirBNActionPerformed JFileChooser chooser = new JFileChooser(); + if (chunkDir!=null) { + chooser.setCurrentDirectory(chunkDir); + } chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); int stat = chooser.showOpenDialog(this); chunkDir = chooser.getSelectedFile();