]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
1. QtxMenu.cxx modified to avoid crashes in Qt4.7.2 when using collapsible feature
authorsbh <sbh@opencascade.com>
Fri, 31 Aug 2012 12:56:48 +0000 (12:56 +0000)
committersbh <sbh@opencascade.com>
Fri, 31 Aug 2012 12:56:48 +0000 (12:56 +0000)
2. problem caused by merging with BR_HDF5_QT_QWT resolved (Plot2d_ViewFrame.cxx)

.cproject
.project
src/Plot2d/Plot2d_ViewFrame.cxx
src/Qtx/QtxMenu.cxx

index b60927323a509c626abbb436e7c235eabd39639b..e88e5b806f6137102c0c4c67ae504e629509619d 100644 (file)
--- a/.cproject
+++ b/.cproject
@@ -17,7 +17,7 @@
                                        <folderInfo id="cdt.managedbuild.toolchain.gnu.base.1899820145.806943159" name="/" resourcePath="">
                                                <toolChain id="cdt.managedbuild.toolchain.gnu.base.1889138318" name="cdt.managedbuild.toolchain.gnu.base" superClass="cdt.managedbuild.toolchain.gnu.base">
                                                        <targetPlatform archList="all" binaryParser="" id="cdt.managedbuild.target.gnu.platform.base.2059218063" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
-                                                       <builder arguments="suit-build.py" buildPath="${workspace_loc}/bop.build/suit-build/v5.1.21.local" command="python" id="cdt.managedbuild.target.gnu.builder.base.1637449156" incrementalBuildTarget="" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/>
+                                                       <builder arguments="suit-build.py" buildPath="${workspace_loc}/bop.build/suit-build/v5.2.0" command="python" id="cdt.managedbuild.target.gnu.builder.base.1637449156" incrementalBuildTarget="" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/>
                                                        <tool id="cdt.managedbuild.tool.gnu.archiver.base.916379429" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
                                                        <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1605378749" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
                                                                <option id="gnu.cpp.compiler.option.include.paths.1471093851" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
index 3f7671410c890c4469b3ebfcf4745cc1f909a9c6..6b343b949a8f33620f7da0b0c78602e233b3a02e 100644 (file)
--- a/.project
+++ b/.project
@@ -31,7 +31,7 @@
                                </dictionary>
                                <dictionary>
                                        <key>org.eclipse.cdt.make.core.buildLocation</key>
-                                       <value>${workspace_loc}/bop.build/suit-build/v5.1.21.local</value>
+                                       <value>${workspace_loc}/bop.build/suit-build/v5.2.0</value>
                                </dictionary>
                                <dictionary>
                                        <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
index 603bbd3b59434426ea942af466eb030893726d7e..3a38103bb4e70707f9d5f4abc839162db9024a72 100755 (executable)
@@ -940,16 +940,6 @@ void Plot2d_ViewFrame::setupSettingsDlg( Plot2d_SetupViewDlg* /*theDlg*/ )
 {
 }
 
-/*!
-  Protected virtual method called by onSettings() slot, 
-  can be redefined to customize the dialog box appearance.
-  \param theDlg a pointer to the 2D plot settings dialog box instance
-  \sa onSettings()
-*/
-void Plot2d_ViewFrame::setupSettingsDlg( Plot2d_SetupViewDlg* /*theDlg*/ )
-{
-}
-
 /*!
   "Settings" toolbar action slot
 */
index 632a80324362ca78ab233782df8fd133839b9bdb..7b5db9251961cf67b812fb8ae60ff3dbcf72b71c 100644 (file)
@@ -631,6 +631,8 @@ public:
 
   virtual bool     eventFilter( QObject*, QEvent* );
 
+  public:
+    
 protected:
   virtual QWidget* createWidget( QWidget* );
   virtual void     deleteWidget( QWidget* );
@@ -671,46 +673,14 @@ bool QtxMenu::Expander::eventFilter( QObject* o, QEvent* e )
 */
 QWidget* QtxMenu::Expander::createWidget( QWidget* parent )
 {
-  class Button : public QToolButton
-  {
-  public:
-    Button( QWidget* p = 0 ) : QToolButton( p ) {};
-    virtual ~Button() {};
-
-  protected:
-    virtual void resizeEvent( QResizeEvent* e )
-    {
-      QToolButton::resizeEvent( e );
-      /*
-      QPixmap pix( size() );
-      QPainter p( &pix );
-      icon().paint( &p, rect() );
-      p.end();
-
-      if ( pix.mask().isNull() )
-      {
-        QBitmap bm;
-        QImage img = pix.toImage();
-       if ( img.hasAlphaChannel() )
-       bm = QPixmap::fromImage( img.createAlphaMask() );
-       else
-       bm = QPixmap::fromImage( img.createHeuristicMask() );
-
-       pix.setMask( bm );
-       }
-
-       if ( !pix.mask().isNull() )
-       setMask( pix.mask() );
-      */
-    };
-  };
 
   QToolButton* tb = new QToolButton( parent );
   QPixmap pix( expand_button_xpm );
   tb->setIcon( pix );
   tb->setAutoRaise( true );
   tb->installEventFilter( this );
-
+  // added by AVO 2012.08.09 to hide expand button shown in menu if Expander is not added
+  tb->setVisible(false);
   connect( tb, SIGNAL( clicked( bool ) ), this, SIGNAL( triggered( bool ) ) );
 
   return tb;
@@ -844,10 +814,10 @@ void QtxMenu::setMenuCollapsible( bool on )
   if ( menuCollapsible() == on )
     return;
 
-  if ( on )
+  if ( on ) {
     myExpandAction = new Expander( this );
-  else
-  {
+    // myExpandAction->setVisible(false);
+  } else {
     if ( isMenuCollapsed() )
       expandMenu();
 
@@ -1412,7 +1382,11 @@ void QtxMenu::onExpandMenu()
 void QtxMenu::onActionHovered( QAction* a )
 {
   if ( a == myExpandAction ) {
+    QtxMenu::Expander* savedExpAction = myExpandAction;
+    myExpandAction = NULL;
     setActiveAction( myExpandAction );
+    myExpandAction = savedExpAction;
+    
     if ( expandingDelay() )
       myShortTimer->start();
   }