Skip to content

Commit

Permalink
Print zoom limit
Browse files Browse the repository at this point in the history
Improved: Limit print zoom (#40)
Added: AFC format version.
  • Loading branch information
viktor-zin committed Sep 12, 2014
1 parent 07eb41a commit bd6d14f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ void MainWindow::slotFilePrint()
{
z = page.height() / (double) r->height;
}

if (z > (printer.resolution()/96.0)) z = printer.resolution()/96.0;
document()->setZoom(z);
r->adjustSize(z);
r->adjustPosition(0, 0);
Expand Down
4 changes: 4 additions & 0 deletions zvflowchart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,10 @@ void QBlock::makeBackwardCompatibility() {
}
}

if(type() == "algorithm") {
attributes.insert("version", AFC_VERSION);
}

for(int i = 0; i < items.size(); ++i) {
items.at(i)->makeBackwardCompatibility();
}
Expand Down
2 changes: 2 additions & 0 deletions zvflowchart.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include <QDomDocument>
#include "qflowchartstyle.h"

#define AFC_VERSION "1.2"

class QBlock;
class QFlowChart;
//class QBranch;
Expand Down

0 comments on commit bd6d14f

Please sign in to comment.