File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -691,11 +691,18 @@ public DefaultMutableTreeNode buildSketchbookTree() {
691691
692692 /** Sketchbook has changed, update it on next viewing. */
693693 public void rebuildSketchbookFrame () {
694- boolean wasVisible =
695- (sketchbookFrame == null ) ? false : sketchbookFrame .isVisible ();
696- sketchbookFrame = null ; // Force a rebuild
697- if (wasVisible ) {
698- showSketchbookFrame ();
694+ if (sketchbookFrame != null ) {
695+ boolean visible = sketchbookFrame .isVisible ();
696+ Rectangle bounds = null ;
697+ if (visible ) {
698+ bounds = sketchbookFrame .getBounds ();
699+ sketchbookFrame .setVisible (false );
700+ }
701+ sketchbookFrame = null ;
702+ if (visible ) {
703+ showSketchbookFrame ();
704+ sketchbookFrame .setBounds (bounds );
705+ }
699706 }
700707 }
701708
You can’t perform that action at this time.
0 commit comments