Skip to content

Commit 25ef918

Browse files
committed
Removed manual widget deletion
1 parent 36faf4c commit 25ef918

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

src/ScatterplotPlugin.cpp

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -270,40 +270,9 @@ ScatterplotPlugin::ScatterplotPlugin(const PluginFactory* factory) :
270270

271271
ScatterplotPlugin::~ScatterplotPlugin()
272272
{
273-
// Ensure proper cleanup order - disconnect any remaining connections
274-
// before member variables are destroyed
275-
if (_scatterPlotWidget) {
276-
disconnect(_scatterPlotWidget, nullptr, this, nullptr);
277-
disconnect(&_scatterPlotWidget->getPixelSelectionTool(), nullptr, this, nullptr);
278-
// Remove from parent to prevent double-deletion by Qt's cleanup
279-
_scatterPlotWidget->setParent(nullptr);
280-
delete _scatterPlotWidget;
281-
_scatterPlotWidget = nullptr;
282-
}
283-
284-
// Clear any remaining connections from position dataset
285273
if (_positionDataset.isValid()) {
286274
disconnect(&_positionDataset, nullptr, this, nullptr);
287275
}
288-
289-
// Disconnect all connections from settings action members to avoid
290-
// accessing freed memory during member destruction
291-
disconnect(&_settingsAction, nullptr, this, nullptr);
292-
disconnect(&_settingsAction.getColoringAction(), nullptr, this, nullptr);
293-
disconnect(&_settingsAction.getColoringAction().getColorByAction(), nullptr, this, nullptr);
294-
disconnect(&_settingsAction.getPlotAction().getPointPlotAction().getFocusSelection(), nullptr, this, nullptr);
295-
disconnect(&_settingsAction.getPlotAction().getPointPlotAction().getSizeAction(), nullptr, this, nullptr);
296-
disconnect(&_settingsAction.getPlotAction().getPointPlotAction().getOpacityAction(), nullptr, this, nullptr);
297-
298-
// Disconnect from sampler action
299-
disconnect(&getSamplerAction(), nullptr, this, nullptr);
300-
301-
// Clean up drop widget after scatterplot widget to maintain proper order
302-
if (_dropWidget) {
303-
_dropWidget->setParent(nullptr);
304-
delete _dropWidget;
305-
_dropWidget = nullptr;
306-
}
307276
}
308277

309278
void ScatterplotPlugin::init()

0 commit comments

Comments
 (0)