File tree 2 files changed +9
-0
lines changed
src/main/java/org/broad/igv
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -568,6 +568,13 @@ public File getLastGenomeImportDirectory() {
568
568
public void setApplicationFrameBounds (Rectangle bounds ) {
569
569
570
570
if (bounds .width > 0 && bounds .height > 0 ) {
571
+ // check the values of MaxX(x+width) and MaxY(y+width)
572
+ if (bounds .getMaxY ()<300 ) {
573
+ bounds .setLocation (bounds .x ,0 );
574
+ }
575
+ if (bounds .getMaxX ()<300 ) {
576
+ bounds .setLocation (0 ,bounds .y );
577
+ }
571
578
StringBuffer buffer = new StringBuffer ();
572
579
buffer .append (bounds .x );
573
580
buffer .append ("," );
Original file line number Diff line number Diff line change @@ -247,7 +247,9 @@ public void windowGainedFocus(WindowEvent windowEvent) {
247
247
Rectangle applicationBounds = preferences .getApplicationFrameBounds ();
248
248
249
249
if (applicationBounds == null || applicationBounds .getMaxX () > screenBounds .getWidth () ||
250
+ applicationBounds .getMaxX () < 300 ||
250
251
applicationBounds .getMaxY () > screenBounds .getHeight () ||
252
+ applicationBounds .getMaxY () < 300 ||
251
253
applicationBounds .width == 0 || applicationBounds .height == 0 ) {
252
254
int width = Math .min (1150 , (int ) screenBounds .getWidth ());
253
255
int height = Math .min (800 , (int ) screenBounds .getHeight ());
You can’t perform that action at this time.
0 commit comments