Gracefully handle deletion of selected object in object editor.
This commit is contained in:
@@ -171,6 +171,7 @@ namespace glabels
|
|||||||
|
|
||||||
connect( mObject, SIGNAL(changed()), this, SLOT(onObjectChanged()) );
|
connect( mObject, SIGNAL(changed()), this, SLOT(onObjectChanged()) );
|
||||||
connect( mObject, SIGNAL(moved()), this, SLOT(onObjectMoved()) );
|
connect( mObject, SIGNAL(moved()), this, SLOT(onObjectMoved()) );
|
||||||
|
connect( mObject, SIGNAL(destroyed(QObject*)), this, SLOT(onObjectDestroyed()) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -202,6 +203,13 @@ namespace glabels
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ObjectEditor::onObjectDestroyed()
|
||||||
|
{
|
||||||
|
disconnect( mObject, 0, this, 0 );
|
||||||
|
mObject = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void ObjectEditor::onLineControlsChanged()
|
void ObjectEditor::onLineControlsChanged()
|
||||||
{
|
{
|
||||||
if ( !mBlocked )
|
if ( !mBlocked )
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ namespace glabels
|
|||||||
void onSelectionChanged();
|
void onSelectionChanged();
|
||||||
void onObjectChanged();
|
void onObjectChanged();
|
||||||
void onObjectMoved();
|
void onObjectMoved();
|
||||||
|
void onObjectDestroyed();
|
||||||
void onLineControlsChanged();
|
void onLineControlsChanged();
|
||||||
void onFillControlsChanged();
|
void onFillControlsChanged();
|
||||||
void onPositionControlsChanged();
|
void onPositionControlsChanged();
|
||||||
|
|||||||
Reference in New Issue
Block a user