Skip to content

Commit

Permalink
Was showing 1/2 degrees even when there was no diff between the two
Browse files Browse the repository at this point in the history
  • Loading branch information
johncurrier committed Aug 25, 2008
1 parent 51df7b2 commit 1ba73f0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/net/sourceforge/schemaspy/view/HtmlTablePage.java
Original file line number Diff line number Diff line change
Expand Up @@ -544,15 +544,18 @@ private boolean generateDots(Table table, File diagramDir, WriteStats stats) thr

DotFormatter formatter = DotFormatter.getInstance();
LineWriter dotOut = new LineWriter(oneDegreeDotFile, Config.DOT_CHARSET);
formatter.writeRealRelationships(table, false, stats, dotOut);
WriteStats oneStats = new WriteStats(stats);
formatter.writeRealRelationships(table, false, oneStats, dotOut);
dotOut.close();

dotOut = new LineWriter(twoDegreesDotFile, Config.DOT_CHARSET);
WriteStats twoStats = new WriteStats(stats);
impliedConstraints = formatter.writeRealRelationships(table, true, twoStats, dotOut);
dotOut.close();
if (stats.getNumTablesWritten() + stats.getNumViewsWritten() == twoStats.getNumTablesWritten() + twoStats.getNumViewsWritten())

if (oneStats.getNumTablesWritten() + oneStats.getNumViewsWritten() == twoStats.getNumTablesWritten() + twoStats.getNumViewsWritten()) {
twoDegreesDotFile.delete(); // no different than before, so don't show it
}

if (!impliedConstraints.isEmpty()) {
dotOut = new LineWriter(impliedDotFile, Config.DOT_CHARSET);
Expand Down

0 comments on commit 1ba73f0

Please sign in to comment.