Skip to content

Commit

Permalink
saves last used directories
Browse files Browse the repository at this point in the history
  • Loading branch information
peepshow-21 committed Jan 18, 2022
1 parent ea10e35 commit 08e83e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion nextion.properties
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions src/systems/proto/nsflash/MakeChunksFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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();
Expand Down

0 comments on commit 08e83e1

Please sign in to comment.