]> SALOME platform Git repositories - modules/superv.git/commitdiff
Salome HOME
Fixes for the following bugs:
authormkr <mkr@opencascade.com>
Tue, 30 May 2006 12:44:22 +0000 (12:44 +0000)
committermkr <mkr@opencascade.com>
Tue, 30 May 2006 12:44:22 +0000 (12:44 +0000)
1) IPAL12503: REGR: crash on close study from SUPERVISOR;
2) PAL12448: In Edit Ports, can't unselect a name.

src/SUPERVGUI/SUPERVGUI.cxx
src/SUPERVGUI/SUPERVGUI_ManagePortsDlg.cxx
src/SUPERVGUI/SUPERVGUI_ManagePortsDlg.h

index 743e9c167c8fdcdc433b8d5887f6c894ce716363..2e0b2c70c2e000975ade342b451747cbd6283d04 100644 (file)
@@ -376,7 +376,7 @@ void SUPERVGUI::onGraphClosed(SUIT_ViewWindow* theViewWindow) {
     SUPERVGUI_Main* aGraph = dynamic_cast<SUPERVGUI_Main*>(view);
     if ( aGraph ) {
       // mkr: PAL12449 --->
-      if ( !aGraph->isDataflowInStudy() ) {
+      if ( (( SalomeApp_Study* )(aGraph->getStudy()))->studyDS() && !aGraph->isDataflowInStudy() ) {
        const int aWarnResult = QMessageBox::information(application()->desktop(), tr("MSG_INFO"),
                                                         tr("MSG_GRAPH_UNSAVED"),
                                                         QMessageBox::Yes, QMessageBox::No);
index bbf2d1e1329e5d33e6763d5edf2d4578b38590ef..5e17544b22a0af3c4bc444c91e173e6456af19d7 100644 (file)
@@ -273,6 +273,10 @@ void SUPERVGUI_ManagePortsDlg::init()
   connect( myNameEdt, SIGNAL(textChanged(const QString&)), this, SLOT(nameChanged(const QString&)));
   connect( myTypeCombo, SIGNAL(activated(const QString&)), this, SLOT(typeChanged(const QString&)));
 
+  // mkr: PAL12448
+  connect( myInList,SIGNAL(rightButtonClicked(QListBoxItem*, const QPoint&)), this, SLOT(itemDeselect(QListBoxItem*, const QPoint&)));
+  connect( myOutList,SIGNAL(rightButtonClicked(QListBoxItem*, const QPoint&)), this, SLOT(itemDeselect(QListBoxItem*, const QPoint&)));
+  
   myNode->getMain()->lockedGraph( true );
 
   // asv : 11.01.05 : if a node is a loop node, then only INPUT ports can be added/removed
@@ -682,8 +686,14 @@ void SUPERVGUI_ManagePortsDlg::itemChanged( QListBoxItem * item ) {
   connect( myTypeCombo, SIGNAL(activated(const QString&)), this, SLOT(typeChanged(const QString&)));
 }
 
-
-
+/*!
+ * Deselect the current selected item
+ */
+void SUPERVGUI_ManagePortsDlg::itemDeselect(QListBoxItem* item, const QPoint& point) {
+  // mkr: PAL12448
+  if ( item->isSelected() )
+    item->listBox()->setSelected(item, false);
+}
 
 /*!
  * Port parameters dialog definition (taken from SUPERVGUI_Node.cxx without change)
index 1e3506b75e07eb8f76448607134a2b19cb56adeb..8e9c6ea7cf28a54e8c6afc8647b7bf29e7aa81e0 100644 (file)
@@ -63,6 +63,7 @@ protected slots:
   void nameChanged( const QString& name );
   void typeChanged( const QString& type );
   void itemChanged( QListBoxItem * item );
+  void itemDeselect(QListBoxItem* item, const QPoint& point); // mkr: PAL12448
 
 protected:
   virtual void showEvent( QShowEvent* theEvent );