]> OCCT Git - occt.git/commitdiff
0026888: Crash in Java ImportExport sample on shape deleting
authorski <ski@opencascade.com>
Fri, 11 Dec 2015 12:29:23 +0000 (15:29 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 17 Dec 2015 14:47:03 +0000 (17:47 +0300)
Corrected behaviour of 3d viewer after shape deleting in qt samples.
Corrected behaviour of toolbar buttons after shape deleting in csharp samples.

samples/CSharp/WPF_D3D/OCCViewer.cs
samples/CSharp/WPF_WinForms/OCCViewer.cs
samples/CSharp/WinForms/Form2.cs
samples/qt/Common/src/DocumentCommon.cxx

index 64a6917f0710eb93ced3075c20bcc0b0250d25de..f0bdde3b734a3e74e9a24685153333ea41195f84 100644 (file)
@@ -402,6 +402,7 @@ namespace IE_WPF_D3D
     public void Delete ()
     {
       View.EraseObjects ();
+      SelectionChanged ();
     }
 
     protected void MultiDragEvent (int x, int y, int theState)
index 89976e67e526212002850b277252aacb7c7f5198..48101da5becd431aa660420c7691d594cc581078 100644 (file)
@@ -481,6 +481,7 @@ namespace IE_WPF_WinForms
         public void Delete()
         {
             View.EraseObjects();
+            SelectionChanged();
         }
 
         public void OnKeyDown( System.Windows.Input.Key theKey )
index f082d854f4c59087b6c5f7bd3dd99e6a3fdcaaf2..06287ad24151f9610d188d31eb10dbd3d08e64a2 100644 (file)
@@ -638,6 +638,8 @@ namespace IE_WinForms
     public void DeleteObjects()
     {
       myOCCTProxy.EraseObjects();
+      IE_WinForms.Form1 parent = (IE_WinForms.Form1)this.ParentForm;
+      parent.SelectionChanged();
     }
     public void ImportModel(IE_WinForms.ModelFormat format)
     {
index bccf024ec491c63d0dd16f8acb3f35a92d07c6bc..34783086ddc0121b44796a231815bc72633423de 100755 (executable)
@@ -236,5 +236,6 @@ void DocumentCommon::onDelete()
 {
     myContext->EraseSelected (Standard_False);
     myContext->ClearSelected();
+    myContext->UpdateCurrentViewer();
     getApplication()->onSelectionChanged();
 }