From: mkr Date: Thu, 23 Jun 2005 07:03:21 +0000 (+0000) Subject: Fix for bug IPAL9241 : Changing view mode of the dataflow changes background color. X-Git-Tag: T3_0_0_a4~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=478e103d1e0c63a920139c7bf3b315a8d5eddbd7;p=modules%2Fsuperv.git Fix for bug IPAL9241 : Changing view mode of the dataflow changes background color. --- diff --git a/src/SUPERVGUI/SUPERVGUI_ArrayView.cxx b/src/SUPERVGUI/SUPERVGUI_ArrayView.cxx index b2b0309..63d7ac2 100644 --- a/src/SUPERVGUI/SUPERVGUI_ArrayView.cxx +++ b/src/SUPERVGUI/SUPERVGUI_ArrayView.cxx @@ -95,8 +95,12 @@ void SUPERVGUI_ArrayView::changeBackground() { QColor aColor = QColorDialog::getColor(canvas()->backgroundColor(), this ); if ( aColor.isValid() ) { + // change background color for array view canvas()->setBackgroundColor(aColor); setPaletteBackgroundColor(aColor.light(120)); + // change background color for canvas view + getMain()->getCanvasView()->canvas()->setBackgroundColor(aColor); + getMain()->getCanvasView()->setPaletteBackgroundColor(aColor.light(120)); } } diff --git a/src/SUPERVGUI/SUPERVGUI_Canvas.cxx b/src/SUPERVGUI/SUPERVGUI_Canvas.cxx index dd99c80..732a0f9 100644 --- a/src/SUPERVGUI/SUPERVGUI_Canvas.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Canvas.cxx @@ -86,7 +86,7 @@ SUPERVGUI_Canvas::SUPERVGUI_Canvas(SUPERVGUI_Main* m): Trace("SUPERVGUI_Canvas::SUPERVGUI_Canvas"); myIsControlView = false; // resize(GRAPH_WIDTH, GRAPH_HEIGHT); - resize(800, 600); + resize(1000, 725); setDoubleBuffering(true); QColor aColor(MAIN_COLOR); diff --git a/src/SUPERVGUI/SUPERVGUI_CanvasArray.cxx b/src/SUPERVGUI/SUPERVGUI_CanvasArray.cxx index baeafa5..cf94047 100644 --- a/src/SUPERVGUI/SUPERVGUI_CanvasArray.cxx +++ b/src/SUPERVGUI/SUPERVGUI_CanvasArray.cxx @@ -80,7 +80,7 @@ SUPERVGUI_CanvasArray::SUPERVGUI_CanvasArray(SUPERVGUI_Main* m): { Trace("SUPERVGUI_CanvasArray::SUPERVGUI_CanvasArray"); //resize(GRAPH_WIDTH, GRAPH_HEIGHT); - resize(800, 600); + resize(1000, 725); setDoubleBuffering(true); QColor aColor(MAIN_COLOR); diff --git a/src/SUPERVGUI/SUPERVGUI_CanvasView.cxx b/src/SUPERVGUI/SUPERVGUI_CanvasView.cxx index bbe4d72..b2d536f 100644 --- a/src/SUPERVGUI/SUPERVGUI_CanvasView.cxx +++ b/src/SUPERVGUI/SUPERVGUI_CanvasView.cxx @@ -327,7 +327,7 @@ void SUPERVGUI_CanvasView::contentsMouseMoveEvent(QMouseEvent* theEvent) myLinkBuilder->setFloatPoint(p); canvas()->update(); } - + if (myCurrentItem) { // setHilighted(0); if (myCurrentItem->x() && myCurrentItem->y()) { @@ -556,8 +556,12 @@ void SUPERVGUI_CanvasView::changeBackground() { QColor aColor = QColorDialog::getColor(canvas()->backgroundColor(), this ); if ( aColor.isValid() ) { + // change background color for canvas view canvas()->setBackgroundColor(aColor); setPaletteBackgroundColor(aColor.light(120)); + // change background color for array view + getMain()->getArrayView()->canvas()->setBackgroundColor(aColor); + getMain()->getArrayView()->setPaletteBackgroundColor(aColor.light(120)); } }