|
@@ -45,20 +45,25 @@ export namespace IInspector {
|
|
|
*/
|
|
|
export interface IInspectable {
|
|
|
/**
|
|
|
- * A signal emitted when the handler is disposed.
|
|
|
+ * A signal emitted when the inspector should clear all items.
|
|
|
*/
|
|
|
- disposed: ISignal<any, void>;
|
|
|
+ cleared: ISignal<any, void>;
|
|
|
|
|
|
/**
|
|
|
- * A signal emitted when the inspector should clear all items.
|
|
|
+ * A signal emitted when the inspectable is disposed.
|
|
|
*/
|
|
|
- cleared: ISignal<any, void>;
|
|
|
+ disposed: ISignal<any, void>;
|
|
|
|
|
|
/**
|
|
|
* A signal emitted when an inspector value is generated.
|
|
|
*/
|
|
|
inspected: ISignal<any, IInspectorUpdate>;
|
|
|
|
|
|
+ /**
|
|
|
+ * Test whether the inspectable has been disposed.
|
|
|
+ */
|
|
|
+ isDisposed: boolean;
|
|
|
+
|
|
|
/**
|
|
|
* Indicates whether the inspectable source emits signals.
|
|
|
*
|
|
@@ -115,6 +120,11 @@ export class InspectorPanel extends Panel implements IInspector {
|
|
|
this._source.disposed.disconnect(this.onSourceDisposed, this);
|
|
|
}
|
|
|
|
|
|
+ // Reject a source that is already disposed.
|
|
|
+ if (source && source.isDisposed) {
|
|
|
+ source = null;
|
|
|
+ }
|
|
|
+
|
|
|
// Update source.
|
|
|
this._source = source;
|
|
|
|