Skip to content

Commit 0069912

Browse files
committed
fixed numerous little bugs
1 parent 9ca046c commit 0069912

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

settings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22
<settings>
3-
<last-notes-file>H:\Gaming\Factorio\any%_Nefrums_import.xml</last-notes-file>
3+
<last-notes-file>H:\Gaming\Factorio\any%_Nefrums.txt</last-notes-file>
44
<color-settings current="Dark">
55
<color-profile>
66
<name>Light</name>

src/gui/MainGui.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class MainGui {
5252

5353
public static Dimension screensize;
5454

55-
public static String currentVersionTag = "v3.1";
55+
public static String currentVersionTag = "v3.2";
5656

5757
private static void prepareGui()
5858
{

src/logic/FileOperations.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,8 @@ public static void writeSettingsFile()
272272

273273
public static void createNewFile()
274274
{
275-
fileNotesDirectory = fileNotesName = null;
275+
fileNotesDirectory = "";
276+
fileNotesName = "new_notes";
276277
MainGui.reset();
277278
numberOfColumns = 2;
278279

src/logic/MouseAdapters.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ public void mouseClicked(MouseEvent e)
9191
AddRemoveControl control = (AddRemoveControl) e.getComponent().getParent();
9292
Section section = control.getRow().getSection();
9393

94-
// adding actual row
95-
section.addContentLine(control.getRow().getRowIndex() );
96-
9794
// increasing the rowIndices of the following rows
9895
for (Row any_row : section.getRows() )
9996
if (any_row.getRowIndex() >= control.getRow().getRowIndex() )
10097
any_row.increaseRowIndex();
101-
98+
99+
// adding actual row
100+
section.addContentLine(control.getRow().getRowIndex() - 1);
101+
102102
// redrawing GUI
103103
MainGui.arrangeContent();
104104
MainGui.spaceColums();

src/logic/Row.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public class Row
5454
rowIndex = row_index;
5555
this.section = section;
5656

57-
if (last_row)
57+
if (last_row == Row.LAST)
5858
{
5959
todoLabel = new TodoLabel();
6060
controlPanel = AddRemoveControl.createAddRowControl(this);
@@ -64,7 +64,7 @@ public class Row
6464
todoLabel = new TodoLabel("");
6565
controlPanel = AddRemoveControl.createAddRemoveRowControl(this);
6666
for (int i = 0; i < FileOperations.numberOfColumns; i ++)
67-
cells.add(new Cell(this, i, "") );
67+
cells.add(new Cell(this, i, " ") );
6868
}
6969
}
7070

@@ -112,6 +112,8 @@ Element getXMLElement(Document doc)
112112
{
113113
Element result = doc.createElement("row");
114114

115+
result.setAttribute("row_index", "" + rowIndex);
116+
115117
for (Cell cell : cells)
116118
result.appendChild(cell.getXMLElement(doc) );
117119

@@ -167,7 +169,7 @@ public TodoLabel(String todo_string)
167169
}
168170

169171
/**
170-
* Creates an placeholder TodoLabel used on the last row of each section (now content, just the add row control).
172+
* Creates an placeholder TodoLabel used on the last row of each section (no content, just the add row control).
171173
*/
172174
public TodoLabel()
173175
{

0 commit comments

Comments
 (0)