]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Adaptation of toolbar size corrected (issue #32)
authorvsv <vsv@coldrex.nnov.opencascade.com>
Mon, 21 Apr 2014 07:23:42 +0000 (11:23 +0400)
committervsv <vsv@coldrex.nnov.opencascade.com>
Mon, 21 Apr 2014 07:23:42 +0000 (11:23 +0400)
src/XGUI/XGUI_ViewPort.cpp
src/XGUI/XGUI_ViewWindow.cpp
src/XGUI/XGUI_ViewWindow.h
src/XGUI/XGUI_Viewer.cpp

index d0cfa2d555bbfce8aaea3e91b0f9b61ac1e1bc8b..c71796465e8178b970dbf4341009cf4ab83dec1b 100644 (file)
@@ -178,6 +178,8 @@ OpenGLUtils_FrameBuffer::~OpenGLUtils_FrameBuffer()
 bool OpenGLUtils_FrameBuffer::init(const GLsizei& xSize, const GLsizei& ySize)
 {
   char* ext = (char*) glGetString(GL_EXTENSIONS);
+  if (!ext)
+    return false;
   if (!IsEXTInitialized || strstr(ext, "GL_EXT_framebuffer_object") == NULL) {
     //qDebug( "Initializing OpenGL FrameBuffer extension failed");
     return false;
index b8b90d69637663fbf9218e1515549e5d185f221c..5e56d61db4ab26be2d6fa7ce00a552289d461d94 100644 (file)
@@ -259,7 +259,6 @@ XGUI_ViewWindow::XGUI_ViewWindow(XGUI_Viewer* theViewer, V3d_TypeOfView theType)
   myWindowBar = new ViewerToolbar(this, myViewPort);
   myWindowBar->setCursor(Qt::PointingHandCursor);
   aToolLay->addWidget(myWindowBar);
-  myWindowBar->setFixedWidth(100);
 
   myMinimizeBtn = new QAction(myWindowBar);
   myMinimizeBtn->setIcon(MinimizeIco);
@@ -289,6 +288,14 @@ XGUI_ViewWindow::~XGUI_ViewWindow()
 {
 }
 
+
+//****************************************************************
+void XGUI_ViewWindow::showEvent(QShowEvent* theEvent)
+{
+  QFrame::showEvent(theEvent);
+  myWindowBar->setFixedSize(myWindowBar->sizeHint());
+}
+
 //****************************************************************
 void XGUI_ViewWindow::changeEvent(QEvent* theEvent)
 {
index 0af119b372227aba44c5e5a230cedf8d7dadc110..e528138a3bd3ea331919fb9541de5c5c9047037a 100644 (file)
@@ -190,6 +190,8 @@ protected:
 
   virtual bool eventFilter(QObject *theObj, QEvent *theEvent);
 
+  virtual void showEvent(QShowEvent* theEvent);
+
 private slots:
   void onClose();
   void onMinimize();
@@ -302,7 +304,7 @@ public:
   {
     setBackgroundRole(QPalette::NoRole);
     setAttribute(Qt::WA_NoSystemBackground);
-    setAttribute(Qt::WA_PaintOnScreen);
+    //setAttribute(Qt::WA_PaintOnScreen);
     setAutoFillBackground(false);
   }
 
@@ -328,7 +330,7 @@ public:
   {
     setBackgroundRole(QPalette::NoRole);
     setAttribute(Qt::WA_NoSystemBackground);
-    setAttribute(Qt::WA_PaintOnScreen);
+    //setAttribute(Qt::WA_PaintOnScreen);
     setAutoFillBackground(false);
   }
 
index 30ac2e1d384ebead48b6ed9b75db9c619c3f5bc7..917b3d552838ba68c59b194da793270322b993cf 100644 (file)
@@ -415,10 +415,8 @@ void XGUI_Viewer::addView(QMdiSubWindow* theView)
 /*!
     Emit activated for view \a view.
 */
-static int AA = 0;
 void XGUI_Viewer::onWindowActivated(QMdiSubWindow* view)
 {
-  qDebug("### windowActivated %i\n", AA++);
   if (view && (view != myActiveView)) {
     myActiveView = view;
     ((XGUI_ViewWindow*)myActiveView->widget())->windowActivated();