@@ -238,7 +238,7 @@ iAPlaneSliceTool::iAPlaneSliceTool(iAMainWindow* mainWnd, iAMdiChild* child) :
238
238
m_snapshotTable->selectRow (idRow.second );
239
239
emit snapshotAdded (idRow.first , info);
240
240
});
241
- iAMainWindow::get () ->addActionIcon (addAction, " plus" );
241
+ mainWnd ->addActionIcon (addAction, " plus" );
242
242
auto addButton = new QToolButton (buttonContainer);
243
243
addButton->setDefaultAction (addAction);
244
244
@@ -262,7 +262,7 @@ iAPlaneSliceTool::iAPlaneSliceTool(iAMainWindow* mainWnd, iAMdiChild* child) :
262
262
m_child->updateRenderer ();
263
263
}
264
264
});
265
- iAMainWindow::get () ->addActionIcon (cutAction, " cut_plane" );
265
+ mainWnd ->addActionIcon (cutAction, " cut_plane" );
266
266
auto cutButton = new QToolButton (buttonContainer);
267
267
cutButton->setDefaultAction (cutAction);
268
268
@@ -273,13 +273,13 @@ iAPlaneSliceTool::iAPlaneSliceTool(iAMainWindow* mainWnd, iAMdiChild* child) :
273
273
clearSnapshots ();
274
274
emit snapshotsCleared ();
275
275
});
276
- iAMainWindow::get () ->addActionIcon (clearAction, " close" );
276
+ mainWnd ->addActionIcon (clearAction, " close" );
277
277
auto clearButton = new QToolButton (buttonContainer);
278
278
clearButton->setDefaultAction (clearAction);
279
279
280
280
auto resetAction = new QAction (" Reset" );
281
281
resetAction->setToolTip (" Reset slicing position to middle of first image dataset, aligned along a selected coordinate axis." );
282
- QObject::connect (resetAction, &QAction::triggered, child, [this , child ]()
282
+ QObject::connect (resetAction, &QAction::triggered, child, [this ]()
283
283
{
284
284
iAAttributes params;
285
285
addAttr (params, " Axis" , iAValueType::Categorical, QStringList () << " +X" << " -X" << " +Y" << " -Y" << " +Z" << " -Z" );
@@ -292,7 +292,7 @@ iAPlaneSliceTool::iAPlaneSliceTool(iAMainWindow* mainWnd, iAMdiChild* child) :
292
292
resetPlaneParameters (nameToAxis (axisStr.right (1 )), axisStr[0 ] == ' +' );
293
293
updateSliceFromUser ();
294
294
});
295
- iAMainWindow::get () ->addActionIcon (resetAction, " slice-planes-gray" );
295
+ mainWnd ->addActionIcon (resetAction, " slice-planes-gray" );
296
296
auto resetButton = new QToolButton (buttonContainer);
297
297
resetButton->setDefaultAction (resetAction);
298
298
@@ -324,7 +324,7 @@ iAPlaneSliceTool::iAPlaneSliceTool(iAMainWindow* mainWnd, iAMdiChild* child) :
324
324
}
325
325
}
326
326
});
327
- iAMainWindow::get () ->addActionIcon (syncAction, " slicer-sync" );
327
+ mainWnd ->addActionIcon (syncAction, " slicer-sync" );
328
328
auto syncButton = new QToolButton (buttonContainer);
329
329
syncButton->setDefaultAction (syncAction);
330
330
@@ -504,7 +504,7 @@ std::pair<quint64, int> iAPlaneSliceTool::addSnapshot(iASnapshotInfo info)
504
504
removeSnapshot (id);
505
505
emit snapshotRemoved (id);
506
506
});
507
- iAMainWindow::get () ->addActionIcon (removeAction, " delete" );
507
+ m_mainWindow ->addActionIcon (removeAction, " delete" );
508
508
auto removeButton = new QToolButton (actionContainer);
509
509
removeButton->setDefaultAction (removeAction);
510
510
actionContainer->layout ()->addWidget (removeButton);
0 commit comments