[TD] Gui: remove some superfluous nullptr checks
This commit is contained in:
@@ -210,13 +210,13 @@ void QGEPath::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
||||
void QGEPath::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
QGIView *view = dynamic_cast<QGIView *> (parentItem());
|
||||
assert(view != nullptr);
|
||||
assert(view);
|
||||
Q_UNUSED(view);
|
||||
|
||||
Q_EMIT hover(false);
|
||||
QGraphicsItem* parent = parentItem();
|
||||
bool parentSel(false);
|
||||
if (parent != nullptr) {
|
||||
if (parent) {
|
||||
parentSel = parent->isSelected();
|
||||
}
|
||||
if (!parentSel && !isSelected()) {
|
||||
@@ -291,10 +291,10 @@ void QGEPath::clearMarkers()
|
||||
return;
|
||||
}
|
||||
for (auto& m: m_markers) {
|
||||
if (m != nullptr) {
|
||||
if (m) {
|
||||
m->hide();
|
||||
QGraphicsScene* s = m->scene();
|
||||
if (s != nullptr) {
|
||||
if (s) {
|
||||
s->removeItem(m); //should this be setParentItem(nullptr) instead??
|
||||
}
|
||||
delete m;
|
||||
@@ -335,7 +335,7 @@ void QGEPath::onDoubleClick(QPointF pos, int markerIndex)
|
||||
void QGEPath::onEndEdit(void)
|
||||
{
|
||||
// Base::Console().Message("QGEPath::onEndEdit()\n");
|
||||
if (m_ghost != nullptr) {
|
||||
if (m_ghost) {
|
||||
scene()->removeItem(m_ghost); //stop ghost from messing up brect
|
||||
}
|
||||
inEdit(false);
|
||||
|
||||
Reference in New Issue
Block a user