|
extragear/graphics/kst/kst: msg#00201kde.kst
SVN commit 437713 by arwalker: Need to reset the labels if a plot has been resized, to ensure the plot alignment and margins are correctly calculated. M +7 -7 kst2dplot.cpp M +7 -0 kstlabel.cpp M +1 -0 kstlabel.h --- trunk/extragear/graphics/kst/kst/kst2dplot.cpp #437712:437713 @@ -2086,13 +2086,13 @@ y_px = p.window().height(); if (_oldSize != size()) { - XLabel->setSize(XLabel->size()); - YLabel->setSize(YLabel->size()); - TopLabel->setSize(TopLabel->size()); - XTickLabel->setSize(XTickLabel->size()); - YTickLabel->setSize(YTickLabel->size()); - XFullTickLabel->setSize(XFullTickLabel->size()); - YFullTickLabel->setSize(YFullTickLabel->size()); + XLabel->resize(); + YLabel->resize(); + TopLabel->resize(); + XTickLabel->resize(); + YTickLabel->resize(); + XFullTickLabel->resize(); + YFullTickLabel->resize(); } rectWindow = p.window(); --- trunk/extragear/graphics/kst/kst/kstlabel.cpp #437712:437713 @@ -767,6 +767,13 @@ } +void KstLabel::resize( ) { + Width = -1; // invalidate the width + LineSpacing = -1; + setDirty(); +} + + void KstLabel::setSize(int in_size) { if (in_size != Size) { Width = -1; // invalidate the width --- trunk/extragear/graphics/kst/kst/kstlabel.h #437712:437713 @@ -75,6 +75,7 @@ void setInterpreted(bool interpreted); bool interpreted() const; + void resize(); void setSize(int size); void setFontName(const QString& fontName); QString fontName() const; |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | extragear/graphics/kst/kst: 00201, Andrew Walker |
|---|---|
| Next by Date: | extragear/graphics/kst/kst/datasources/ascii: 00201, Andrew Walker |
| Previous by Thread: | extragear/graphics/kst/ksti: 00201, Andrew Walker |
| Next by Thread: | Re: extragear/graphics/kst/kst: 00201, George Staikos |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |