Merge pull request #430 from teyrana/fix_debug_window

[fixes #428] DebugLogDialog // details Pane stays hidden (if toggled hidden)
This commit is contained in:
Wes Cravens 2018-08-01 10:49:32 -05:00 committed by GitHub
commit e6612ddbe0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,13 +169,7 @@ public class DebugLogDialog extends JDialog {
@Override
public void actionPerformed(ActionEvent e) {
boolean isActive = ((JCheckBox)e.getSource()).isSelected();
log.info(" toggled to: "+isActive );
bottomPanel.setEnabled(isActive);
if(isActive) {
split.setDividerLocation(0.5);
}else {
split.setDividerLocation(1.0);
}
enableDetailsPanel( isActive);
}
});
@ -460,6 +454,17 @@ public class DebugLogDialog extends JDialog {
}
}
}
private void enableDetailsPanel(final boolean isActive){
bottomPanel.setEnabled(isActive);
if(isActive){
split.setDividerLocation(0.5);
split.setBottomComponent(bottomPanel);
}else {
split.setBottomComponent(null);
split.setDividerLocation(1.0);
}
}
/**