Skip to content

Commit

Permalink
Merge e7e5472 into ff6bf1e
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Aug 29, 2018
2 parents ff6bf1e + e7e5472 commit b99a8f1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion doc/downloads/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var jsonData = { "versions": [
],
"changes": [
{ "change": "<strong>General:</strong> Clang code model related cleaning up (see issue <a href=\"https://github.com/opencor/opencor/issues/1747\">#1747</a>). Allow the use of another Qt style (see issue <a href=\"https://github.com/opencor/opencor/issues/1761\">#1761</a>). Improved HiDPI support (see issue <a href=\"https://github.com/opencor/opencor/issues/1763\">#1763</a>)." },
{ "change": "<strong>Graph Panel widget:</strong> only reset axes when needed (see issue <a href=\"https://github.com/opencor/opencor/issues/1777\">#1777</a>). Added support for pinch gestures (see issue <a href=\"https://github.com/opencor/opencor/issues/1783\">#1783</a>). Fixed an issue with some graph panels potentially aligning only after a short delay (see issue <a href=\"https://github.com/opencor/opencor/issues/1790\">#1790</a>)." },
{ "change": "<strong>Graph Panel widget:</strong> only reset axes when needed (see issue <a href=\"https://github.com/opencor/opencor/issues/1777\">#1777</a>). Added support for pinch gestures (see issue <a href=\"https://github.com/opencor/opencor/issues/1783\">#1783</a>). Fixed an issue with some graph panels potentially aligning only after a short delay (see issue <a href=\"https://github.com/opencor/opencor/issues/1790\">#1790</a>). Fixed an issue with some graph panels not getting aligned on resetting another graph panel (see issue <a href=\"https://github.com/opencor/opencor/issues/1794\">#1794</a>)." },
{ "change": "<strong>Core plugin:</strong> fixed a problem with the menu items for recently opened files potentially appearing as disabled on macOS (see issue <a href=\"https://github.com/opencor/opencor/issues/1633\">#1633</a>)." },
{ "change": "<strong>Simulation Experiment view:</strong> added some basic preferences for graph panels and graphs (see issue <a href=\"https://github.com/opencor/opencor/issues/1772\">#1772</a>)." },
{ "change": "<strong>Third-party libraries:</strong> upgraded the <a href=\"http://computation.llnl.gov/projects/sundials\">SUNDIALS</a> library to version 3.1.2 (see issue <a href=\"https://github.com/opencor/opencor/issues/1743\">#1743</a>). Renamed our BioSignalML plugin to libBioSignalML (see issue <a href=\"https://github.com/opencor/opencor/issues/1754\">#1754</a>). Upgraded <a href=\"https://www.openssl.org/\">OpenSSL</a> to version 1.0.2p (see issue <a href=\"https://github.com/opencor/opencor/issues/1767\">#1767</a>)." }
Expand Down
21 changes: 14 additions & 7 deletions src/plugins/widget/GraphPanelWidget/src/graphpanelplotwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3477,13 +3477,20 @@ void GraphPanelPlotWidget::alignWithNeighbors(bool pCanReplot,
// right of the X axis

QwtScaleWidget *xScaleWidget = plot->axisWidget(QwtPlot::xBottom);
int minBorderDistStartX;
int minBorderDistEndX;

getBorderDistances(xScaleWidget->scaleDraw(), canvasMap(QwtPlot::xBottom), xScaleWidget->font(), minBorderDistStartX, minBorderDistEndX);

newMinBorderDistStartX = qMax(newMinBorderDistStartX, minBorderDistStartX);
newMinBorderDistEndX = qMax(newMinBorderDistEndX, minBorderDistEndX);
int defaultMinBorderDistStartX;
int defaultMinBorderDistEndX;
int customMinBorderDistStartX;
int customMinBorderDistEndX;

getBorderDistances(xScaleWidget->scaleDraw(), canvasMap(QwtPlot::xBottom), xScaleWidget->font(), defaultMinBorderDistStartX, defaultMinBorderDistEndX);
xScaleWidget->scaleDraw()->getBorderDistHint(xScaleWidget->font(), customMinBorderDistStartX, customMinBorderDistEndX);

newMinBorderDistStartX = qMax(newMinBorderDistStartX,
qMax(defaultMinBorderDistStartX,
customMinBorderDistStartX));
newMinBorderDistEndX = qMax(newMinBorderDistEndX,
qMax(defaultMinBorderDistEndX,
customMinBorderDistEndX));

// Determine how much space we should have to the left of the Y axis

Expand Down

0 comments on commit b99a8f1

Please sign in to comment.