Gracefully handle deletion of selected object in object editor.

This commit is contained in:
Jim Evins
2015-08-19 15:13:59 -04:00
parent 0834d158ed
commit d2b5822567
2 changed files with 9 additions and 0 deletions
+8
View File
@@ -171,6 +171,7 @@ namespace glabels
connect( mObject, SIGNAL(changed()), this, SLOT(onObjectChanged()) );
connect( mObject, SIGNAL(moved()), this, SLOT(onObjectMoved()) );
connect( mObject, SIGNAL(destroyed(QObject*)), this, SLOT(onObjectDestroyed()) );
}
else
{
@@ -201,6 +202,13 @@ namespace glabels
}
}
void ObjectEditor::onObjectDestroyed()
{
disconnect( mObject, 0, this, 0 );
mObject = 0;
}
void ObjectEditor::onLineControlsChanged()
{
+1
View File
@@ -69,6 +69,7 @@ namespace glabels
void onSelectionChanged();
void onObjectChanged();
void onObjectMoved();
void onObjectDestroyed();
void onLineControlsChanged();
void onFillControlsChanged();
void onPositionControlsChanged();