/*!SLOT. Copy objects to study maneger from selection maneger..*/
void SalomeApp_Application::onCopy()
{
+ LightApp_Application::onCopy();
+
SALOME_ListIO list;
LightApp_SelectionMgr* mgr = selectionMgr();
mgr->selectedObjects(list);
if(it.More())
{
_PTR(SObject) so = stdDS->FindObjectID(it.Value()->getEntry());
- try {
- studyMgr()->Copy(so);
- onSelectionChanged();
- }
- catch(...) {
+ if( so )
+ {
+ try {
+ studyMgr()->Copy(so);
+ onSelectionChanged();
+ }
+ catch(...) {
+ }
}
}
}
/*!SLOT. Paste objects to study maneger from selection manager.*/
void SalomeApp_Application::onPaste()
{
+ LightApp_Application::onPaste();
+
SALOME_ListIO list;
LightApp_SelectionMgr* mgr = selectionMgr();
mgr->selectedObjects(list);
if(it.More())
{
_PTR(SObject) so = stdDS->FindObjectID(it.Value()->getEntry());
- try {
- studyMgr()->Paste(so);
- updateObjectBrowser( true );
- updateActions(); //SRN: BugID IPAL9377, case 3
- }
- catch(...) {
+ if( so )
+ {
+ try {
+ studyMgr()->Paste(so);
+ updateObjectBrowser( true );
+ updateActions(); //SRN: BugID IPAL9377, case 3
+ }
+ catch(...) {
+ }
}
}
}