}
}
#endif
+ theCoords.insets().add(at.nucleus(), x, y);
at->drawSelection(pi, x, y);
at->draw(pi, x, y);
x += at->width();
if (abs(lastx - targetx) < abs(currx - targetx) && it != begin())
--it;
- // The below code guarantees that in this slice, the cursor will
+ // The below code guarantees that in this slice, the cursor will
// never be on the right edge of an inset after a mouse click.
- if (it != begin())
+#ifdef WITH_WARNINGS
+#warning A better solution has to be found here!
+ // FIXME: this is too brute! The position left to an inset should
+ // be reachable with the mouse in general.
+#endif
+ if (it != begin()) {
--it;
- if (it < end() && (*it)->getChar())
- ++it;
-
+ if (it < end() && (*it)->getChar())
+ ++it;
+ }
+
return it - begin();
}