Commit 502eeead authored by Emmanuel Promayon's avatar Emmanuel Promayon

FIXED do not use deprecated setVisibility in CamiTK CE

parent a6257ac2
......@@ -27,7 +27,6 @@
#include <QObject>
#include <Action.h>
#include <Viewer.h>
#include <ImageComponent.h>
......@@ -66,7 +65,6 @@ public slots:
// A special widget will be displaied to edit colors.
virtual QWidget* getWidget();
private:
/// helper method to simplify the target component processing
virtual void process(camitk::ImageComponent* comp);
......
......@@ -459,7 +459,7 @@ QMenu* Component::getActionMenu() {
visibilityAction->setWhatsThis(tr(tipString.toStdString().c_str()));
// add the toggle action slot using C++11 lambda so that everything is contained inside viewMenu
connect(visibilityAction, &QAction::toggled, [ = ](bool visible) {
setVisibility(viewer, visible);
setVisibility(viewer->getName(), visible);
Application::refresh();
});
}
......
......@@ -535,7 +535,7 @@ void ImageComponent::setVisibility(Viewer* v, bool b) {
}
}
Component::setVisibility(v, b);
Component::setVisibility(v->getName(), b);
}
// -------------------- update3DViewer --------------------
......
......@@ -114,7 +114,7 @@ void BitmapViewer::updateVisibility() {
for (Component* comp : Application::getAllComponents()) {
SingleImageComponent* singleImageComp = dynamic_cast<SingleImageComponent*>(comp);
if (singleImageComp != nullptr && singleImageComp->getSliceOrientation()==Slice::AXIAL) {
singleImageComp->setVisibility(this, true);
singleImageComp->setVisibility(this->getName(), true);
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment