From ac23a47fcb6693c71211198766deaae40d362430 Mon Sep 17 00:00:00 2001 From: ptv Date: Wed, 4 Oct 2006 08:19:43 +0000 Subject: [PATCH] STV fixes from WPdev that were integrated after tag "LAST_STABLE_VERSION_21_09_2006_ON_3_2_0 --- src/GLViewer/GLViewer_ViewManager.cxx | 14 ++------------ src/GLViewer/GLViewer_ViewManager.h | 9 +-------- src/ObjBrowser/OB_ListView.cxx | 5 +++-- src/Qtx/QtxDialog.cxx | 7 ++++--- src/Qtx/QtxWorkstack.cxx | 2 ++ 5 files changed, 12 insertions(+), 25 deletions(-) diff --git a/src/GLViewer/GLViewer_ViewManager.cxx b/src/GLViewer/GLViewer_ViewManager.cxx index b9cbff5ae..8e1f1e860 100644 --- a/src/GLViewer/GLViewer_ViewManager.cxx +++ b/src/GLViewer/GLViewer_ViewManager.cxx @@ -28,14 +28,11 @@ #include "GLViewer_Viewer2d.h" #include "SUIT_Desktop.h" -int GLViewer_ViewManager::myMaxId = 0; - /*!Constructor.*/ GLViewer_ViewManager::GLViewer_ViewManager( SUIT_Study* theStudy, SUIT_Desktop* theDesktop ) -: SUIT_ViewManager( theStudy, theDesktop ) +: SUIT_ViewManager( theStudy, theDesktop, new GLViewer_Viewer2d( "GLViewer" ) ) { - myId = ++myMaxId; - setViewModel( new GLViewer_Viewer2d( "GLViewer" ) ); + setTitle( tr( "GL_VIEW_TITLE" ) ); } /*!Destructor.*/ @@ -43,13 +40,6 @@ GLViewer_ViewManager::~GLViewer_ViewManager() { } -/*!Sets view name for view window \a theView.*/ -void GLViewer_ViewManager::setViewName(SUIT_ViewWindow* theView) -{ - int aPos = myViews.find(theView); - theView->setCaption( QString( "GL scene:%1 - viewer:%2" ).arg(myId).arg(aPos+1)); -} - /*!Context menu popup for \a popup.*/ void GLViewer_ViewManager::contextMenuPopup( QPopupMenu* popup ) { diff --git a/src/GLViewer/GLViewer_ViewManager.h b/src/GLViewer/GLViewer_ViewManager.h index cfc25f1f9..3542d63f3 100644 --- a/src/GLViewer/GLViewer_ViewManager.h +++ b/src/GLViewer/GLViewer_ViewManager.h @@ -36,18 +36,11 @@ class GLVIEWER_API GLViewer_ViewManager : public SUIT_ViewManager Q_OBJECT public: GLViewer_ViewManager( SUIT_Study* theStudy, SUIT_Desktop* theDesktop ); - ~GLViewer_ViewManager(); + virtual ~GLViewer_ViewManager(); GLViewer_Viewer* getGLViewer() { return (GLViewer_Viewer*) myViewModel; } virtual void contextMenuPopup( QPopupMenu* ); - -protected: - void setViewName(SUIT_ViewWindow* theView); - -protected: - static int myMaxId; - int myId; }; #endif // GLVIEWER_VIEWMANAGER_H diff --git a/src/ObjBrowser/OB_ListView.cxx b/src/ObjBrowser/OB_ListView.cxx index ebcd5c879..728e12c27 100755 --- a/src/ObjBrowser/OB_ListView.cxx +++ b/src/ObjBrowser/OB_ListView.cxx @@ -222,9 +222,10 @@ bool OB_ListView::isDropAccepted( QListViewItem* drag, QListViewItem* drop ) con void OB_ListView::setColumnWidth( int col, int width ) { int max = columnMaxWidth( col ); - if( max>0 && width>max ) + if ( max>0 && width>max ) width = max; - QListView::setColumnWidth( col, width ); + + QtxListView::setColumnWidth( col, width ); } /*! diff --git a/src/Qtx/QtxDialog.cxx b/src/Qtx/QtxDialog.cxx index 2554511a4..c52cb85fe 100755 --- a/src/Qtx/QtxDialog.cxx +++ b/src/Qtx/QtxDialog.cxx @@ -416,12 +416,13 @@ QSize QtxDialog::Border::minimumSizeHint() const QtxDialog::QtxDialog( QWidget* parent, const char* name, bool modal, bool allowResize, const int f, WFlags wf ) : QDialog( parent, name, modal, -#ifdef WIN32 wf | WStyle_Customize | WStyle_Title | WStyle_SysMenu | - ( allowResize ? WStyle_NormalBorder : WStyle_NoBorderEx ) ), +#ifdef WIN32 + ( allowResize ? WStyle_NormalBorder : WStyle_NoBorderEx ) | #else - wf | WStyle_NormalBorder | WStyle_Customize | WStyle_Title | WStyle_SysMenu ), + WStyle_NormalBorder | #endif + ( allowResize ? WStyle_Maximize : 0 ) ), mySender( 0 ), myAlignment( 0 ), myInited( false ), diff --git a/src/Qtx/QtxWorkstack.cxx b/src/Qtx/QtxWorkstack.cxx index 303b7317f..90829e4f1 100644 --- a/src/Qtx/QtxWorkstack.cxx +++ b/src/Qtx/QtxWorkstack.cxx @@ -948,6 +948,8 @@ void QtxWorkstack::onContextMenuRequested( QWidget* w, QPoint p ) myActionsMap[Rename]->addTo( pm ); } + Qtx::simplifySeparators( pm ); + if ( pm->count() ) pm->exec( p ); -- 2.39.2