818 for (LDObject* obj : g_curfile->objs ()) |
818 for (LDObject* obj : g_curfile->objs ()) |
819 obj->setSelected (false); |
819 obj->setSelected (false); |
820 |
820 |
821 m_objList->clearSelection (); |
821 m_objList->clearSelection (); |
822 for (LDObject* obj : m_sel) { |
822 for (LDObject* obj : m_sel) { |
|
823 if( obj->qObjListEntry == null ) |
|
824 continue; |
|
825 |
823 obj->qObjListEntry->setSelected (true); |
826 obj->qObjListEntry->setSelected (true); |
824 obj->setSelected (true); |
827 obj->setSelected (true); |
825 } |
828 } |
826 |
829 |
827 g_bSelectionLocked = false; |
830 g_bSelectionLocked = false; |
1173 |
1176 |
1174 assert (g_metacursor < MAX_ACTIONS); |
1177 assert (g_metacursor < MAX_ACTIONS); |
1175 g_actionMeta[g_metacursor++] = meta; |
1178 g_actionMeta[g_metacursor++] = meta; |
1176 } |
1179 } |
1177 |
1180 |
|
1181 void ForgeWindow::clearSelection() |
|
1182 { |
|
1183 m_sel.clear(); |
|
1184 } |
|
1185 |
1178 QImage imageFromScreencap (uchar* data, ushort w, ushort h) { |
1186 QImage imageFromScreencap (uchar* data, ushort w, ushort h) { |
1179 // GL and Qt formats have R and B swapped. Also, GL flips Y - correct it as well. |
1187 // GL and Qt formats have R and B swapped. Also, GL flips Y - correct it as well. |
1180 return QImage (data, w, h, QImage::Format_ARGB32).rgbSwapped ().mirrored (); |
1188 return QImage (data, w, h, QImage::Format_ARGB32).rgbSwapped ().mirrored (); |
1181 } |
1189 } |