Skip to content

Commit

Permalink
Fixed invisible stash cells after exiting from settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Exslims committed Mar 18, 2017
1 parent b76d4ea commit 9356086
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

public abstract class MovableComponentFrame extends ComponentFrame {
protected Container mainContainer;
private FrameConstraints prevConstraints;
protected FrameConstraints prevConstraints;
protected UndecoratedFrameState moveState = UndecoratedFrameState.DEFAULT;
protected boolean locationWasChanged = false;
protected boolean sizeWasChanged = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ protected void initialize() {
this.setPreferredSize(this.getMaximumSize());
this.pack();
}

private ItemCell getGridCell(int x, int y){
JPanel cellPanel = new JPanel();
cellPanel.setOpaque(true);
cellPanel.setBackground(AppThemeColor.TRANSPARENT);
ItemCell cell = new ItemCell(x+1,y+1,cellPanel);
return cell;
return new ItemCell(x+1,y+1,cellPanel);
}

private JPanel getHeaderPanel(){
Expand Down Expand Up @@ -125,6 +125,7 @@ public void initHandlers() {
}
navBar.add(cellHeader);
tabButtons.put(nickname + message.getTabName(), cellHeader);
repaint();
pack();
}
}
Expand Down Expand Up @@ -225,6 +226,14 @@ private void closeGridItem(ItemMessage message) {
}
}

@Override
protected void onLock() {
super.onLock();
if(navBar.getComponentCount() > 0){
this.setVisible(true);
}
}

@Override
protected JPanel panelWhenMove() {
JPanel panel = componentsFactory.getTransparentPanel(new BorderLayout());
Expand Down

0 comments on commit 9356086

Please sign in to comment.