show selection bounds on rulers

This commit is contained in:
bancika
2017-04-20 14:12:00 +02:00
parent dc8612a167
commit b3d63e9f22
6 changed files with 66 additions and 3 deletions
@@ -550,6 +550,16 @@ public class CanvasPlugin implements IPlugIn, ClipboardOwner {
break;
case REPAINT:
canvasPanel.repaint();
// Refresh selection bounds after we're done with painting to ensure we have traced the
// component areas
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
if (ConfigurationManager.getInstance().readBoolean(IPlugInPort.SHOW_RULERS_KEY, true))
scrollPane.setSelectionRectangle(plugInPort.getSelectionBounds());
}
});
break;
}
// }