Salome HOME
Fix for bug IPAL10030 : Opening of SUPERVISOR in study2 leads to crash or calls fatal...
authormkr <mkr@opencascade.com>
Thu, 22 Sep 2005 06:54:01 +0000 (06:54 +0000)
committermkr <mkr@opencascade.com>
Thu, 22 Sep 2005 06:54:01 +0000 (06:54 +0000)
src/SUPERVGUI/SUPERVGUI_CanvasView.cxx
src/SUPERVGUI/SUPERVGUI_Clipboard.h

index b2d536f43063f4ba8697de4a9a7eb2c0786bdf1c..ecdc2d0537ec73a2f06b57a3bb659123f101fff9 100644 (file)
@@ -158,6 +158,7 @@ SUPERVGUI_CanvasView::SUPERVGUI_CanvasView(SUPERVGUI_Canvas* theCanvas, SUPERVGU
 
 SUPERVGUI_CanvasView::~SUPERVGUI_CanvasView()
 {
+  SUPERVGUI_Clipboard::setNullClipboard();
 }
 
 void SUPERVGUI_CanvasView::contentsMousePressEvent(QMouseEvent* theEvent) 
index 26dce84e32b395fc3e4247234b998ebfebe4f405..3faf72ce3a7363830a996fcc705294c948799862 100644 (file)
@@ -55,6 +55,10 @@ public:
     return myCB;
   }
 
+  static void setNullClipboard() {
+    if ( myCB ) myCB = 0;
+  }
+
   bool isCopyPort() const { return ( myCopyPort && !CORBA::is_nil( myCopyPort ) ); }
   SUPERV::Port_var getCopyPort() const            { return myCopyPort;   }
   void setCopyPort( SUPERV::Port_var theObj )     { myCopyPort = theObj; }