[Kst] extragear/graphics/kst/kst
Andrew Walker
arwalker at sumusltd.com
Fri Dec 16 20:34:15 CET 2005
SVN commit 489016 by arwalker:
no longer crash when left click on a line or arrow end point to move the end point and release without moving the mouse at all
M +16 -14 ksttoplevelview.cpp
--- trunk/extragear/graphics/kst/kst/ksttoplevelview.cpp #489015:489016
@@ -1002,21 +1002,23 @@
Q_UNUSED(shift)
if (KstViewLinePtr line = kst_cast<KstViewLine>(_pressTarget)) {
- QPoint toPoint, fromPoint;
- if (_pressDirection & UP) {
- // UP means we are on the start endpoint
- toPoint = _prevBand.bottomRight();
- fromPoint = _prevBand.topLeft();
- } else if (_pressDirection & DOWN) {
- // DOWN means we are on the end endpoint
- fromPoint = _prevBand.topLeft();
- toPoint = _prevBand.bottomRight();
- } else {
- abort();
+ if (_prevBand.left() != -1 && _prevBand.top() != -1) {
+ QPoint toPoint, fromPoint;
+ if (_pressDirection & UP) {
+ // UP means we are on the start endpoint
+ toPoint = _prevBand.bottomRight();
+ fromPoint = _prevBand.topLeft();
+ } else if (_pressDirection & DOWN) {
+ // DOWN means we are on the end endpoint
+ fromPoint = _prevBand.topLeft();
+ toPoint = _prevBand.bottomRight();
+ } else {
+ abort();
+ }
+ line->setFrom(fromPoint);
+ line->setTo(toPoint);
+ _onGrid = false;
}
- line->setFrom(fromPoint);
- line->setTo(toPoint);
- _onGrid = false;
}
}
More information about the Kst
mailing list