Normand Briere
2019-08-15 24a2a946b35279605e645349bd6b82e9e60aac88
GroupEditor.java
....@@ -928,7 +928,7 @@
928928
929929 JTabbedPane resourcecontainer;
930930 cGridBag currenttab;
931
- boolean added; // patch for jar
931
+ //boolean added; // patch for jar
932932
933933 int tabcount = 0;
934934 int colcount = 0;
....@@ -940,17 +940,19 @@
940940
941941 public void ResourceCallBack(String[] path)
942942 {
943
- for (int i = 0; i < path.length; i++)
944
- System.out.print(path[i] + "/");
945
- System.out.println();
943
+// for (int i = 0; i < path.length; i++)
944
+// System.out.print(path[i] + "/");
945
+// System.out.println();
946946
947947 if (//rowcount == 0 ||
948
- path.length == 1)
948
+ path.length == 1 && !path[0].equals("") && !path[0].equals(".DS_Store"))
949949 {
950950 currenttab = new cGridBag();
951
- added = false;
952951 String tabname = path[0]; // String.valueOf((char)('A'+tabcount));
953952 currenttab.setName(tabname);
953
+ //added = false;
954
+ resourcecontainer.add(currenttab);
955
+ resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname);
954956 rowcount = 1;
955957 colcount = 0;
956958 texturecount = 0;
....@@ -958,12 +960,11 @@
958960
959961 if (path.length > 2 && path[2].toLowerCase().endsWith(".jpg"))
960962 {
961
- if (!added)
963
+ //if (!added)
962964 {
963
- added = true;
964
- resourcecontainer.add(currenttab);
965
+ //added = true;
965966 String tabname = path[0]; // String.valueOf((char)('A'+tabcount));
966
- resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname);
967
+ currenttab = (cGridBag)resourcecontainer.getComponentAt(resourcecontainer.indexOfTab(tabname));
967968 }
968969
969970 AddTextureButton(path[0], path[1], path[2], texturecount++, currenttab);