Skip to content

Commit

Permalink
fixing empty table case
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-mcl committed Sep 11, 2020
1 parent cacd2fd commit 816c3b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/main/java/mclachlan/brewday/ui/jfx/V2DataObjectPane.java
Original file line number Diff line number Diff line change
Expand Up @@ -446,19 +446,16 @@ public void refresh(Database database)

Map<String, T> ref = getMap(database);

if (ref.size() > 0)
{
tableModel.refresh(ref);
tableInitialSort(table);
tableModel.refresh(ref);
tableInitialSort(table);

filterTable();
filterTable();

for (T t : ref.values())
for (T t : ref.values())
{
if (JfxUi.getInstance().isDirty(t))
{
if (JfxUi.getInstance().isDirty(t))
{
rowFactory.setDirty(t);
}
rowFactory.setDirty(t);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public void refresh(Map<String, T> map)
unfilteredList.clear();

this.map = map;
System.out.println("map.size() = [" + map.size() + "]");

unfilteredList.addAll(map.values());
tableView.sort();
Expand Down

0 comments on commit 816c3b8

Please sign in to comment.