Skip to content

Commit 9ae2f71

Browse files
committed
Revert "Remove left and right clipping (#169)"
This reverts commit d3ff322.
1 parent d3ff322 commit 9ae2f71

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/ScatterplotPlugin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ void ScatterplotPlugin::selectPoints()
378378

379379
const auto width = selectionAreaImage.width();
380380
const auto height = selectionAreaImage.height();
381-
const auto size = std::max(width, height);//width < height ? width : height;
381+
const auto size = width < height ? width : height;
382382
const auto uvOffset = QPoint((selectionAreaImage.width() - size) / 2.0f, (selectionAreaImage.height() - size) / 2.0f);
383383

384384
QPointF uvNormalized = {};

src/ScatterplotWidget.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -756,10 +756,8 @@ void ScatterplotWidget::initializeGL()
756756

757757
void ScatterplotWidget::resizeGL(int w, int h)
758758
{
759-
const auto size = std::max(w, h);
760-
761-
_widgetSizeInfo.width = size;
762-
_widgetSizeInfo.height = size;
759+
_widgetSizeInfo.width = static_cast<float>(w);
760+
_widgetSizeInfo.height = static_cast<float>(h);
763761
_widgetSizeInfo.minWH = _widgetSizeInfo.width < _widgetSizeInfo.height ? _widgetSizeInfo.width : _widgetSizeInfo.height;
764762
_widgetSizeInfo.ratioWidth = _widgetSizeInfo.width / _widgetSizeInfo.minWH;
765763
_widgetSizeInfo.ratioHeight = _widgetSizeInfo.height / _widgetSizeInfo.minWH;
@@ -770,8 +768,8 @@ void ScatterplotWidget::resizeGL(int w, int h)
770768
// Pixel ratio tells us how many pixels map to a point
771769
// That is needed as macOS calculates in points and we do in pixels
772770
// On macOS high dpi displays pixel ration is 2
773-
//w *= _pixelRatio;
774-
//h *= _pixelRatio;
771+
w *= _pixelRatio;
772+
h *= _pixelRatio;
775773

776774
_pointRenderer.resize(QSize(w, h));
777775
_densityRenderer.resize(QSize(w, h));

0 commit comments

Comments
 (0)