Bug 92609 - Blue Borders around groups should only appear in layout mode
Summary: Blue Borders around groups should only appear in layout mode
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: view objects (show other bugs)
Version: 1.x
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-02 21:20 UTC by Netterfield
Modified: 2004-11-04 15:02 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Netterfield 2004-11-02 21:20:06 UTC
Version:           1.0.0_pre1 (using KDE 3.3.0, Gentoo)
Compiler:          gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)
OS:                Linux (i686) release 2.6.8-gentoo-r3

Groups have a blue border around them.  As this is a layout property, it should only appear in layout mode.  It should never be plotted.
Comment 1 George Staikos 2004-11-02 23:21:52 UTC
The border also flickers on changes in the contents (such as zooming in a plot).
Comment 2 George Staikos 2004-11-04 15:02:26 UTC
CVS commit by staikos: 

fix border painting as approved by Barth
(does not fix flicker)
BUG: 92609


  M +7 -0      kstplotgroup.cpp   1.22
  M +1 -2      ksttoplevelview.cpp   1.82


--- kdeextragear-2/kst/kst/kstplotgroup.cpp  #1.21:1.22
@@ -35,4 +35,5 @@ KstPlotGroup::KstPlotGroup() : KstMetaPl
   setTagName(i18n("Plot Group %1").arg(++pgcount));
   _type = "plotgroup";
+  setBorderColor(Qt::blue);
 }
 
@@ -120,4 +121,10 @@ void KstPlotGroup::paint(KstPaintType ty
   QBrush brush(_backgroundColor);
 
+  if (KstApp::inst()->getZoomRadio() == KstApp::LAYOUT) {
+    setBorderWidth(3);
+  } else {
+    setBorderWidth(0);
+  }
+
   for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) {
     clipRegion -= QRegion((*i)->geometry());

--- kdeextragear-2/kst/kst/ksttoplevelview.cpp  #1.81:1.82
@@ -183,4 +183,5 @@ void KstTopLevelView::setViewMode(ViewMo
     recursively<bool>(&KstViewObject::setSelected, false);
     clearFocus();
+    paint(P_PAINT);
   } else if (_mode == DisplayMode && v != DisplayMode) {
     recursively<bool>(&KstViewObject::zoom, false);
@@ -892,6 +893,4 @@ void KstTopLevelView::groupSelection() {
 
   if (pg) {
-    pg->setBorderWidth(3);
-    pg->setBorderColor(Qt::blue);
     // First build the container
     for (it = _selectionList.begin(); it != _selectionList.end(); ++it) {