SUIT_Selector( mgr ),
myBrowser( ob )
{
- if ( myBrowser )
+ if ( myBrowser ) {
connect( myBrowser, SIGNAL( selectionChanged() ), this, SLOT( onSelectionChanged() ) );
+ connect( myBrowser, SIGNAL( destroyed() ), this, SLOT( onBrowserDestroyed() ) );
+ }
}
SalomeApp_OBSelector::~SalomeApp_OBSelector()
return myBrowser;
}
+
void SalomeApp_OBSelector::getSelection( SUIT_DataOwnerPtrList& list ) const
{
if ( !myBrowser )
selectionChanged();
}
+void SalomeApp_OBSelector::onBrowserDestroyed()
+{
+ delete this;
+}
+
void SalomeApp_OBSelector::fillEntries( QMap<QString, SalomeApp_DataObject*>& entires )
{
entires.clear();
virtual ~SalomeApp_OBSelector();
OB_Browser* browser() const;
+
+ void setBrowser(OB_Browser* theBrowser);
virtual QString type() const { return "ObjectBrowser"; }
private slots:
void onSelectionChanged();
+ void onBrowserDestroyed();
protected:
virtual void getSelection( SUIT_DataOwnerPtrList& ) const;