File tree Expand file tree Collapse file tree 1 file changed +12
-13
lines changed
app/src/main/java/org/audiveris/omr/sheet Expand file tree Collapse file tree 1 file changed +12
-13
lines changed Original file line number Diff line number Diff line change 5151
5252import java .awt .Color ;
5353import java .awt .Insets ;
54+ import java .awt .Point ;
5455import java .awt .event .ActionEvent ;
5556import java .net .URL ;
5657import java .text .DateFormat ;
@@ -355,6 +356,12 @@ public static void poll (boolean manual)
355356 JOptionPane .INFORMATION_MESSAGE );
356357 }
357358 }
359+
360+ if (!manual ) {
361+ // Remember the date this poll was made
362+ final Calendar now = new GregorianCalendar ();
363+ constants .lastReleaseCheckDate .setValue (now .getTime ());
364+ }
358365 }
359366
360367 //~ Inner Classes ------------------------------------------------------------------------------
@@ -586,6 +593,11 @@ private static class PositivePanel
586593 scrollPane .setViewportView (contentField );
587594
588595 defineLayout ();
596+
597+ // Trick to pre-position the scroll pane at its top left
598+ javax .swing .SwingUtilities .invokeLater ( () -> {
599+ scrollPane .getViewport ().setViewPosition (new Point (0 , 0 ));
600+ });
589601 }
590602
591603 private void defineLayout ()
@@ -636,18 +648,5 @@ private String htmlOf (String markdown)
636648
637649 return renderer .render (parser .parse (markdown ));
638650 }
639-
640- @ Override
641- public void setVisible (boolean visible )
642- {
643- super .setVisible (visible );
644-
645- if (visible == true ) {
646- scrollPane .getVerticalScrollBar ().setValue (0 ); // scroll bar to the top
647- scrollPane .getHorizontalScrollBar ().setValue (0 ); // scroll bar to the left
648- }
649-
650- scrollPane .repaint ();
651- }
652651 }
653652}
You can’t perform that action at this time.
0 commit comments