From cac0180f2af1f6728b82b4581e7829bee8706194 Mon Sep 17 00:00:00 2001
From: YiLiangXie <microos316@gmail.com>
Date: Sun, 9 Apr 2017 13:22:58 +0800
Subject: [PATCH] bug fix

---
 src/hk/microos/frames/MainFrame.java | 42 +++++++++++++++-------------
 1 file changed, 23 insertions(+), 19 deletions(-)

diff --git a/src/hk/microos/frames/MainFrame.java b/src/hk/microos/frames/MainFrame.java
index dcfff75..13a540a 100644
--- a/src/hk/microos/frames/MainFrame.java
+++ b/src/hk/microos/frames/MainFrame.java
@@ -57,10 +57,13 @@ public class MainFrame extends JFrame {
 	private JTable coordTable;
 	public TableHelper imgListTH;
 	public TableHelper coordListTH;
-	private String recordedImgPath = "";
-
-	private String recordedAnnotPath = "";
-	private String recordedSavePath = "";
+	
+	private String recordedPath = "";
+//	private String recordedImgPath = "";
+//	private String recordedAnnotPath = "";
+//	private String recordedSavePath = "";
+	
+	
 	private JButton btnReadImageList;
 
 	private int leftTableSelectedRow = -1;
@@ -81,15 +84,16 @@ public static void main(String[] args) {
 			public void run() {
 				try {
 					MainFrame frame = new MainFrame();
-					frame.recordedImgPath = System.getProperty("user.home")+"/Desktop";
-//					 frame.recordedImgPath =
-//					 "/Users/microos/Downloads/originalPics/imgPath.txt";
-
-					frame.recordedAnnotPath = System.getProperty("user.home") + "/Desktop";
-					// frame.recordedAnnotPath =
-					// "/Users/microos/Downloads/FDDB-folds/FDDB-fold-05-ellipseList.txt";
-					
-					frame.recordedSavePath = System.getProperty("user.home") + "/Desktop";
+					frame.recordedPath = System.getProperty("user.home")+"/Desktop";
+//					frame.recordedImgPath = System.getProperty("user.home")+"/Desktop";
+////					 frame.recordedImgPath =
+////					 "/Users/microos/Downloads/originalPics/imgPath.txt";
+//
+//					frame.recordedAnnotPath = System.getProperty("user.home") + "/Desktop";
+//					// frame.recordedAnnotPath =
+//					// "/Users/microos/Downloads/FDDB-folds/FDDB-fold-05-ellipseList.txt";
+//					
+//					frame.recordedSavePath = System.getProperty("user.home") + "/Desktop";
 					
 					frame.setVisible(true);
 				} catch (Exception e) {
@@ -323,11 +327,11 @@ void updateImagePanelSize(MyImage mim) {
 	}
 
 	void loadImageList() {
-		JFileChooser fc = new JFileChooser(recordedImgPath);
+		JFileChooser fc = new JFileChooser(recordedPath);
 		int res = fc.showOpenDialog(this);
 		if (res == JFileChooser.APPROVE_OPTION) {
 			File f = fc.getSelectedFile();
-			recordedImgPath = f.getParent();
+			recordedPath = f.getParent();
 			if (!IOTool.isTextFile(f)) {
 				// not a readable text file
 				JOptionPane.showMessageDialog(this,
@@ -383,11 +387,11 @@ void loadAnnotList() {
 					"Suffix", JOptionPane.QUESTION_MESSAGE);
 			annotContentSuffix = s == null ? "" : s;
 		}
-		JFileChooser fc = new JFileChooser(recordedAnnotPath);
+		JFileChooser fc = new JFileChooser(recordedPath);
 		int res = fc.showOpenDialog(this);
 		if (res == JFileChooser.APPROVE_OPTION) {
 			File f = fc.getSelectedFile();
-			recordedAnnotPath = f.getParent();
+			recordedPath = f.getParent();
 			if (!IOTool.isTextFile(f)) {
 				// not a readable text file
 				JOptionPane.showMessageDialog(this,
@@ -566,11 +570,11 @@ void outputAnnotations() {
 		// make it a .txt file
 		// ask: output only the new Ellipse or both new and static
 
-		JFileChooser fc = new JFileChooser(recordedSavePath);
+		JFileChooser fc = new JFileChooser(recordedPath);
 		int res = fc.showOpenDialog(this);
 		if (res == JFileChooser.APPROVE_OPTION) {
 			File f = fc.getSelectedFile();
-			recordedImgPath = f.getParent();
+			recordedPath = f.getParent();
 			IOTool.outputEllipse(pathImgPair, f.getAbsolutePath(), pathStaticElpsesPair != null, this);
 
 		}