mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
fix shortcuts
This commit is contained in:
@@ -659,7 +659,7 @@ public class TreePanel extends JPanel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setText("<html>" + payload.toString() + shortCutHtml + variantsHtml + "</html>");
|
setText("<html>" + payload.forDisplay() + shortCutHtml + variantsHtml + "</html>");
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
@@ -704,7 +704,8 @@ public class TreePanel extends JPanel {
|
|||||||
return clickListener;
|
return clickListener;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String categoryForDisplay() {
|
public String forDisplay() {
|
||||||
|
if (componentType == null) {
|
||||||
String display = category;
|
String display = category;
|
||||||
Matcher match = contributedPattern.matcher(display);
|
Matcher match = contributedPattern.matcher(display);
|
||||||
if (match.find()) {
|
if (match.find()) {
|
||||||
@@ -714,10 +715,12 @@ public class TreePanel extends JPanel {
|
|||||||
}
|
}
|
||||||
return display;
|
return display;
|
||||||
}
|
}
|
||||||
|
return componentType.getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return componentType == null ? categoryForDisplay() : componentType.getName();
|
return componentType == null ? category : componentType.getName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user