| 1329 | } |
| 1330 | |
| 1331 | void CartesianPlotDock::horizontalPaddingChanged(double value) { |
| 1332 | CONDITIONAL_RETURN_NO_LOCK; |
| 1333 | |
| 1334 | double padding = Worksheet::convertToSceneUnits(value, m_worksheetUnit); |
| 1335 | for (auto* plot : m_plotList) { |
| 1336 | // if symmetric padding is active we also adjust the right padding. |
| 1337 | // start a macro in this case to only have one single entry on the undo stack. |
| 1338 | // TODO: ideally this is done in CartesianPlot and is completely transparent to CartesianPlotDock. |
| 1339 | const bool sym = m_plot->symmetricPadding(); |
| 1340 | if (sym) |
| 1341 | plot->beginMacro(i18n("%1: set horizontal padding", plot->name())); |
| 1342 | |
| 1343 | plot->setHorizontalPadding(padding); |
| 1344 | |
| 1345 | if (sym) { |
| 1346 | plot->setRightPadding(padding); |
| 1347 | plot->endMacro(); |
| 1348 | } |
| 1349 | } |
| 1350 | } |
| 1351 | |
| 1352 | void CartesianPlotDock::rightPaddingChanged(double value) { |
| 1353 | CONDITIONAL_RETURN_NO_LOCK; |
nothing calls this directly
no test coverage detected