118 if (ev->buttons() & Qt::LeftButton) |
118 if (ev->buttons() & Qt::LeftButton) |
119 { |
119 { |
120 renderer()->document()->clearSelection(); |
120 renderer()->document()->clearSelection(); |
121 LDObject* obj = renderer()->pickOneObject (ev->x(), ev->y()); |
121 LDObject* obj = renderer()->pickOneObject (ev->x(), ev->y()); |
122 |
122 |
123 if (obj != nullptr) |
123 if (obj) |
124 { |
124 { |
125 AddObjectDialog::staticDialog (obj->type(), obj); |
125 AddObjectDialog::staticDialog (obj->type(), obj); |
126 m_window->endAction(); |
126 m_window->endAction(); |
127 return true; |
127 return true; |
128 } |
128 } |