mirror of
https://github.com/SuspiciousActivity/ByteEdit.git
synced 2026-08-13 17:56:17 +00:00
Bug fix
This commit is contained in:
1 parent
ed9b6a177b
commit
1c6a72d951
2 files changed
+10
-10
No files matched your search
@@ -43,8 +43,8 @@ public class TypeOpenBox extends JFrame {
|
|||||||
@Override
|
@Override
|
||||||
public void valueChanged(ListSelectionEvent e) {
|
public void valueChanged(ListSelectionEvent e) {
|
||||||
String val = list.getSelectedValue();
|
String val = list.getSelectedValue();
|
||||||
if (val != null && !val.equals(Main.currentNodeName)) {
|
if (!e.getValueIsAdjusting() && val != null && !val.equals(Main.currentNodeName)) {
|
||||||
SingleThreadedExecutor.submit(() -> Main.selectFile(val));
|
SingleThreadedExecutor.submit(() -> Main.selectFile(val + ".class"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -79,17 +79,17 @@ public class TypeOpenBox extends JFrame {
|
|||||||
}
|
}
|
||||||
String search = UnicodeUtils.unescape(null, txtSearch.getText(), true).toLowerCase();
|
String search = UnicodeUtils.unescape(null, txtSearch.getText(), true).toLowerCase();
|
||||||
if (search.contains("/")) {
|
if (search.contains("/")) {
|
||||||
for (String className : Main.classNodes.keySet()) {
|
for (String fullName : Main.classNodes.keySet()) {
|
||||||
if (!className.contains("$") && className.toLowerCase().startsWith(search)) {
|
if (!fullName.contains("$") && fullName.toLowerCase().startsWith(search)) {
|
||||||
model.addElement(className);
|
model.addElement(fullName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (String className : Main.classNodes.keySet()) {
|
for (String fullName : Main.classNodes.keySet()) {
|
||||||
String[] split = className.split("/");
|
String[] split = fullName.split("/");
|
||||||
className = split[split.length - 1];
|
String className = split[split.length - 1];
|
||||||
if (!className.contains("$") && className.toLowerCase().startsWith(search)) {
|
if (!className.contains("$") && className.toLowerCase().startsWith(search)) {
|
||||||
model.addElement(className);
|
model.addElement(fullName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class ArchiveTreeModel extends DefaultTreeModel {
|
|||||||
super(new ByteEditTreeNode(jar.getName().split(File.separator.equals("\\") ? "\\\\"
|
super(new ByteEditTreeNode(jar.getName().split(File.separator.equals("\\") ? "\\\\"
|
||||||
: File.separator)[jar.getName().split(File.separator.equals("\\") ? "\\\\" : File.separator).length
|
: File.separator)[jar.getName().split(File.separator.equals("\\") ? "\\\\" : File.separator).length
|
||||||
- 1]));
|
- 1]));
|
||||||
this.newCreated = true;
|
this.newCreated = false;
|
||||||
this.jar = jar;
|
this.jar = jar;
|
||||||
this.classNodes = classNodes;
|
this.classNodes = classNodes;
|
||||||
this.otherFiles = otherFiles;
|
this.otherFiles = otherFiles;
|
||||||
|
|||||||
Reference in new issue
Block a user