Skip to content

Commit 18aa5fa

Browse files
committed
Adhere to core
1 parent 41a84b3 commit 18aa5fa

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

src/ScatterplotPlugin.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,11 @@ void ScatterplotPlugin::init()
246246
layout->addWidget(_primaryToolbarAction.createWidget(&getWidget()));
247247
layout->addWidget(_scatterPlotWidget, 100);
248248

249+
auto navigationWidget = new QWidget();
249250
auto navigationLayout = new QHBoxLayout();
250251

252+
navigationLayout->setContentsMargins(4, 4, 4, 4);
253+
251254
navigationLayout->addStretch(1);
252255
{
253256
auto renderersNavigationGroupAction = new HorizontalGroupAction(this, "Renderers Navigation");
@@ -261,11 +264,12 @@ void ScatterplotPlugin::init()
261264
}
262265
navigationLayout->addStretch(1);
263266

264-
layout->addLayout(navigationLayout);
267+
navigationWidget->setLayout(navigationLayout);
268+
269+
layout->addWidget(navigationWidget);
265270

266271
getWidget().setLayout(layout);
267272

268-
// Update the data when the scatter plot widget is initialized
269273
connect(_scatterPlotWidget, &ScatterplotWidget::initialized, this, &ScatterplotPlugin::updateData);
270274

271275
connect(&_scatterPlotWidget->getPixelSelectionTool(), &PixelSelectionTool::areaChanged, [this]() {
@@ -463,6 +467,8 @@ void ScatterplotPlugin::selectPoints()
463467
}
464468
}
465469

470+
_scatterPlotWidget->getPointRendererNavigator().getNavigationAction().getZoomSelectionAction().setEnabled(!targetSelectionIndices.empty());
471+
466472
_positionDataset->setSelectionIndices(targetSelectionIndices);
467473

468474
events().notifyDatasetDataSelectionChanged(_positionDataset->getSourceDataset<Points>());
@@ -597,7 +603,10 @@ void ScatterplotPlugin::positionDatasetChanged()
597603
_positionSourceDataset = _positionDataset->getSourceDataset<Points>();
598604

599605
_numPoints = _positionDataset->getNumPoints();
600-
606+
607+
_scatterPlotWidget->getPointRendererNavigator().resetView(true);
608+
_scatterPlotWidget->getDensityRendererNavigator().resetView(true);
609+
601610
updateData();
602611
}
603612

src/ScatterplotWidget.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,6 @@ PixelSelectionTool& ScatterplotWidget::getSamplerPixelSelectionTool()
249249

250250
void ScatterplotWidget::computeDensity()
251251
{
252-
qDebug() << "ScatterplotWidget::computeDensity()";
253-
254252
emit densityComputationStarted();
255253
{
256254
_densityRenderer.computeDensity();

0 commit comments

Comments
 (0)