Skip to content

Commit

Permalink
fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
chriba committed Sep 28, 2016
1 parent 0de22f1 commit 8f454e7
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/main/java/net/sf/jabref/gui/SidePaneManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public synchronized boolean isComponentVisible(String name) {
}

/**
* if panel is visible it will be hidden and the other way around
* If panel is visible it will be hidden and the other way around
*
* @param name name of the panel
*/
Expand All @@ -80,14 +80,15 @@ public synchronized void toggle(String name) {
}

/**
* if panel is hidden it will be shown and focused
* if panel is visible but not focused it will be focused
* ig panel is visible and focused it will be hidden
* If panel is hidden it will be shown and focused
* If panel is visible but not focused it will be focused
* If panel is visible and focused it will be hidden
*
* @param name name of the panel
*/
public synchronized void toggleThreeWay(String name){
if (isComponentVisible(name) && Globals.getFocusListener().getFocused() == components.get(name)) {
boolean isPanelFocused = Globals.getFocusListener().getFocused() == components.get(name);
if (isComponentVisible(name) && isPanelFocused) {
hide(name);
} else {
show(name);
Expand Down

0 comments on commit 8f454e7

Please sign in to comment.