[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/krita/plugins/paintops
From: Adam Celarek <bugs_kde_org () xibo ! at>
Date: 2010-04-08 18:53:45
Message-ID: 20100408185345.9D3A2AC88F () svn ! kde ! org
[Download RAW message or body]
SVN commit 1112670 by adamc:
2 bugs fixed:
o crash, if deleting all text in textbrush
o default spacing was not used, while drawing
M +5 -0 libbrush/kis_text_brush.cpp
M +1 -1 libpaintop/kis_text_brush_chooser.cpp
--- trunk/koffice/krita/plugins/paintops/libbrush/kis_text_brush.cpp #1112669:1112670
@@ -41,6 +41,11 @@
QFontMetrics metric(m_font);
int w = metric.width(m_txt);
int h = metric.height();
+
+ // don't crash, if there is no text
+ if (w==0) w=1;
+ if (h==0) h=1;
+
QPixmap px(w, h);
QPainter p;
p.begin(&px);
--- trunk/koffice/krita/plugins/paintops/libpaintop/kis_text_brush_chooser.cpp #1112669:1112670
@@ -39,9 +39,9 @@
connect((QObject*)lineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(rebuildTextBrush()));
connect((QObject*)bnFont, SIGNAL(clicked()), this, SLOT(getFont()));
m_font = font();
- rebuildTextBrush();
inputSpacing->setRange(0.0, 10, 2);
inputSpacing->setValue(0.1);
+ rebuildTextBrush();
connect(inputSpacing, SIGNAL(valueChanged(qreal)), this, SLOT(rebuildTextBrush()));
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic