PDEX: clean up rename window positioning

This commit is contained in:
Jakub Valtar
2016-05-06 19:35:19 +02:00
parent 5467d30cf2
commit 0e035b09e4

View File

@@ -600,21 +600,15 @@ public class PDEX {
if (!window.isVisible()) {
this.ps = ps;
this.binding = binding;
window.setLocation(editor.getX()
+ (editor.getWidth() - window.getWidth()) / 2,
editor.getY()
+ (editor.getHeight() - window.getHeight())
/ 2);
oldNameLabel.setText("Current name: " + binding.getName());
textField.setText(binding.getName());
textField.requestFocus();
textField.selectAll();
window.setVisible(true);
window.toFront();
int x = editor.getX() + (editor.getWidth() - window.getWidth()) / 2;
int y = editor.getY() + (editor.getHeight() - window.getHeight()) / 2;
window.setLocation(x, y);
window.setVisible(true);
window.toFront();
}
});
}