Skip to content

Commit

Permalink
Fixed the issue where it wasn't possible to close a notification. Fix…
Browse files Browse the repository at this point in the history
…ed Item Grid setup not being saved correctly.
  • Loading branch information
Exslims committed Apr 2, 2017
1 parent 404ed7d commit 40b5712
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
package com.mercury.platform.ui.components.panel.grid;

import lombok.AllArgsConstructor;
import lombok.Data;

import javax.swing.*;

@Data
@AllArgsConstructor
public class ItemCell{
private int x;
private int y;
private JPanel cell;
public ItemCell(int x, int y, JPanel cell) {
this.x = x;
this.y = y;
this.cell = cell;
}

public int getX() {
return x;
}

public int getY() {
return y;
}

public JPanel getCell() {
return cell;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public void createUI() {

JButton hideButton = componentsFactory.getIconButton("app/close.png", 12, AppThemeColor.FRAME_ALPHA, "Close");
hideButton.addActionListener((action)-> {
stashTab.setUndefined(false);
controller.hidePanel();
});
this.add(hideButton,BorderLayout.LINE_END);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private JPanel getHeaderPanel(){
JPanel root = componentsFactory.getTransparentPanel();
root.setLayout(new BoxLayout(root,BoxLayout.Y_AXIS));
navBar = componentsFactory.getTransparentPanel(new FlowLayout(FlowLayout.LEFT));
navBar.setBorder(BorderFactory.createEmptyBorder(20,0,27,0));
navBar.setBorder(BorderFactory.createEmptyBorder(20,0,21,0));
root.add(navBar);
return root;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public StashTabsContainer() {
}
public void addTab(StashTab tab){
stashTabs.add(tab);
save();
}
public void save(){
ConfigManager.INSTANCE.saveStashTabs(stashTabs);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ public void initHandlers() {
});
EventRouter.CORE.registerHandler(NewWhispersEvent.class, event -> {
SwingUtilities.invokeLater(()-> {
addMessage(((NewWhispersEvent)event).getMessage());
Message message = ((NewWhispersEvent) event).getMessage();
if(!currentMessages.containsKey(message)) {
addMessage(message);
}
});
});
EventRouter.UI.registerHandler(CloseMessagePanelEvent.class, event -> {
Expand Down

0 comments on commit 40b5712

Please sign in to comment.