forked from qt-creator/qt-creator
SCXML editor: fix crash on pressing copy/cut
QtCreator used to crash when copy or cut button were pressed without having selected an item. Task-number: QTCREATORBUG-17637 Change-Id: Iceaea7a9f826ed16c4caee9fc28b4c14eb304c62 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -216,6 +216,9 @@ void GraphicsScene::removeSelectedItems()
|
|||||||
|
|
||||||
void GraphicsScene::copy()
|
void GraphicsScene::copy()
|
||||||
{
|
{
|
||||||
|
if (!m_document->currentTag())
|
||||||
|
return;
|
||||||
|
|
||||||
QPointF minPos;
|
QPointF minPos;
|
||||||
QVector<ScxmlTag*> tags;
|
QVector<ScxmlTag*> tags;
|
||||||
if (m_document->currentTag()->tagType() == Scxml) {
|
if (m_document->currentTag()->tagType() == Scxml) {
|
||||||
|
|||||||
Reference in New Issue
Block a user