On 09/15/2010 07:28 AM, Abdelrazak Younes wrote:
  void InsetLine::draw(PainterInfo&  pi, int x, int y) const
  {
-    frontend::FontMetrics const&  fm = theFontMetrics(pi.base.font);
+ // FIXME: We cannot use InsetCommand::dimension() as this returns the dimension
+    // of the button, which is not used here!
+ Dimension const dim = pi.base.bv->coordCache().getInsets().dim(this);
+    int const max_width = dim.width();

What about overriding InsetCommand::dimension() here? I.e., by default that returns the size of the button, but can be overridden if that isn't relevant.

rh

Reply via email to