Skip to content
Snippets Groups Projects
Commit 6c0793c9 authored by Philipp Spohr's avatar Philipp Spohr
Browse files

small crashfixes

parent 49dbfa2c
Branches
Tags
No related merge requests found
......@@ -22,6 +22,7 @@ public class Core {
CyNetwork currentNetwork = cy.getCurrentNetwork();
if (currentNetwork == null) {
//TODO
return;
}
LibraryInterface.setTimeLimit(timeLimit);
......
package de.hhu.ba.yoshikoWrapper.gui;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
......@@ -17,10 +18,9 @@ public class TimeLimitSetter extends JPanel{
private NumberInputField numberField;
public TimeLimitSetter() {
checkBox = new JCheckBox();
checkBox = new JCheckBox("Use time limit (s):");
numberField = new NumberInputField();
numberField.setEnabled(false); //By default time limit is turned off
numberField.setSize(40, 10);
checkBox.addActionListener(
new ActionListener() {
......@@ -37,7 +37,7 @@ public class TimeLimitSetter extends JPanel{
}
public int getTimeLimit() {
if (checkBox.isSelected()) {
if (!checkBox.isSelected()) {
return -1;
}
return numberField.getTimeLimit();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment