*/
void Plot2d_ViewFrame::plotMousePressed(const QMouseEvent& me )
{
- ((Plot2d_ViewWindow*)parent())->putInfo(getInfo(me.pos()));
+ Plot2d_ViewWindow* aParent = dynamic_cast<Plot2d_ViewWindow*>(parent());
+ if (aParent)
+ aParent->putInfo(getInfo(me.pos()));
if ( myOperation == NoOpId )
myOperation = testOperation( me );
if ( myOperation != NoOpId ) {
}
}
else {
- ((Plot2d_ViewWindow*)parent())->putInfo(getInfo(me.pos()));
+ Plot2d_ViewWindow* aParent = dynamic_cast<Plot2d_ViewWindow*>(parent());
+ if (aParent)
+ aParent->putInfo(getInfo(me.pos()));
}
}
/*!
myPlot->canvas()->setCursor( QCursor( Qt::CrossCursor ) );
myPlot->setOutlineStyle( Qwt::Triangle );
- ((Plot2d_ViewWindow*)parent())->putInfo(tr("INF_READY"));
+ Plot2d_ViewWindow* aParent = dynamic_cast<Plot2d_ViewWindow*>(parent());
+ if (aParent)
+ aParent->putInfo(tr("INF_READY"));
myOperation = NoOpId;
}
/*!