more faster raw editing

This commit is contained in:
honfika@gmail.com
2015-02-02 19:19:06 +01:00
parent 73d5a047c5
commit f32797c682
2 changed files with 8 additions and 20 deletions

View File

@@ -334,25 +334,10 @@ public class GenericTagTreePanel extends GenericTagPanel {
public class MyTreeCellRenderer extends DefaultTreeCellRenderer {
@Override
public Component getTreeCellRendererComponent(
JTree tree,
Object value,
boolean sel,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus) {
super.getTreeCellRendererComponent(
tree, value, sel,
expanded, leaf, row,
hasFocus);
public MyTreeCellRenderer() {
setUI(new BasicLabelUI());
setOpaque(false);
setBackgroundNonSelectionColor(Color.white);
return this;
}
}

View File

@@ -444,10 +444,13 @@ public final class ImagePanel extends JPanel implements ActionListener, MediaDis
@Override
public synchronized void zoom(Zoom zoom) {
this.zoom = zoom;
shouldDraw.set(true);
if (textTag != null) {
setText(textTag, newTextTag);
boolean modified = this.zoom.value != zoom.value || this.zoom.fit != zoom.fit;
if (modified) {
this.zoom = zoom;
shouldDraw.set(true);
if (textTag != null) {
setText(textTag, newTextTag);
}
}
}