]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
added menu item "refresh" and slot onRefresh().
authorasv <asv@opencascade.com>
Fri, 17 Jun 2005 12:28:39 +0000 (12:28 +0000)
committerasv <asv@opencascade.com>
Fri, 17 Jun 2005 12:28:39 +0000 (12:28 +0000)
src/SalomeApp/SalomeApp_Application.cxx
src/SalomeApp/SalomeApp_Application.h
src/SalomeApp/resources/SalomeApp_msg_en.po

index d9b61e94e2741fef8c507b9c292afcc7ac8fab26..817bc404bd0f2b1bd93211a4982b8ba9348e8fa4 100644 (file)
@@ -528,7 +528,7 @@ void SalomeApp_Application::onSelectionChanged()
 }              
  
 
-void SalomeApp_Application::onAboutRefresh()
+void SalomeApp_Application::onRefresh()
 {
   for ( ModuleListIterator it = modules(); it.current(); ++it )
   {    
@@ -536,6 +536,7 @@ void SalomeApp_Application::onAboutRefresh()
     if ( camDM && camDM->inherits( "SalomeApp_DataModel" ) )
       ((SalomeApp_DataModel*)camDM)->update();
   }
+  objectBrowser()->updateTree();
 }
 
 void SalomeApp_Application::setActiveStudy( SUIT_Study* study )
@@ -944,7 +945,6 @@ QWidget* SalomeApp_Application::createWindow( const int flag )
 
     wid = ob;
 
-    connect( ob, SIGNAL( aboutRefresh() ), this, SLOT( onAboutRefresh() ) );
     ob->connectPopupRequest( this, SLOT( onConnectPopupRequest( SUIT_PopupClient*, QContextMenuEvent* ) ) );
   }
   else if ( flag == WT_PyConsole )
@@ -1186,3 +1186,11 @@ QString SalomeApp_Application::getFileName( bool open, const QString& initial, c
   QStringList fls = QStringList::split( ";", filters, false );
   return SUIT_FileDlg::getFileName( parent, initial, fls, caption, open, true );
 }
+
+void SalomeApp_Application::contextMenuPopup( const QString& type, QPopupMenu* thePopup, QString& title )
+{
+  CAM_Application::contextMenuPopup( type, thePopup, title );
+  thePopup->insertSeparator();
+  thePopup->insertItem( tr( "MEN_REFRESH" ), this, SLOT( onRefresh() ) );
+}
+
index adb93cb4e0db2479648e38e3bfc9db972f02c2af..66f10f1d824bedff6f3710593c296a471cb7413a 100644 (file)
@@ -92,6 +92,8 @@ public:
 
   virtual void                        start();
 
+  virtual void                        contextMenuPopup( const QString&, QPopupMenu*, QString& );
+
   static CORBA::ORB_var               orb();
   static SALOMEDSClient_StudyManager* studyMgr();
   static SALOME_NamingService*        namingService();
@@ -110,7 +112,7 @@ public slots:
 
 private slots:
   void                                onSelection();
-  void                                onAboutRefresh();
+  void                                onRefresh();
 
 protected:
   virtual void                        createActions();
index eca1a8dc84d40696a2ca0b69c23bff1324e24082..8a349ab71719608c98876527a9af53be1ff46b42 100644 (file)
@@ -201,3 +201,5 @@ msgstr "MODIFIED"
 msgid "PRP_MODIFICATIONS"
 msgstr "Modifications"
 
+msgid "MEN_REFRESH"
+msgstr "Refresh"