X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FMetricsInfo.cpp;h=2b954d3ed96d12926f78963c9f84cfb74587c6aa;hb=0f21c5caf6c5ba4afdf97f4c780800adf49f6434;hp=e68c18d79d65f4c2c619468032dc7a7e7a5dc78f;hpb=6d4709d46c750eaa31e06d0da18a98a1e71bdea2;p=lyx.git diff --git a/src/MetricsInfo.cpp b/src/MetricsInfo.cpp index e68c18d79d..2b954d3ed9 100644 --- a/src/MetricsInfo.cpp +++ b/src/MetricsInfo.cpp @@ -66,7 +66,7 @@ MetricsInfo::MetricsInfo(BufferView * bv, FontInfo const & font, int textwidth, PainterInfo::PainterInfo(BufferView * bv, lyx::frontend::Painter & painter) : pain(painter), ltr_pos(false), change_(), selected(false), - full_repaint(true), background_color(Color_background) + do_spellcheck(true), full_repaint(true), background_color(Color_background) { base.bv = bv; } @@ -186,9 +186,8 @@ ArrayChanger::ArrayChanger(MetricsBase & mb) ///////////////////////////////////////////////////////////////////////// ShapeChanger::ShapeChanger(FontInfo & font, FontShape shape) - : Changer(font) + : Changer(font, font.shape()) { - save_ = orig_.shape(); orig_.setShape(shape); } @@ -213,7 +212,6 @@ StyleChanger::StyleChanger(MetricsBase & mb, Styles style) { 0, 0, -3, -5 }, { 3, 3, 0, -2 }, { 5, 5, 2, 0 } }; - save_ = mb; int t = diff[mb.style][style]; if (t > 0) while (t--) @@ -242,7 +240,6 @@ FontSetChanger::FontSetChanger(MetricsBase & mb, char const * name, : Changer(mb), change_(really_change_font) { if (change_) { - save_ = mb; FontSize oldsize = save_.font.size(); ColorCode oldcolor = save_.font.color(); docstring const oldname = from_ascii(save_.fontname); @@ -263,7 +260,6 @@ FontSetChanger::FontSetChanger(MetricsBase & mb, docstring const & name, : Changer(mb), change_(really_change_font) { if (change_) { - save_ = mb; FontSize oldsize = save_.font.size(); ColorCode oldcolor = save_.font.color(); docstring const oldname = from_ascii(save_.fontname); @@ -295,7 +291,6 @@ FontSetChanger::~FontSetChanger() WidthChanger::WidthChanger(MetricsBase & mb, int w) : Changer(mb) { - save_ = mb; mb.textwidth = w; } @@ -314,10 +309,9 @@ WidthChanger::~WidthChanger() ColorChanger::ColorChanger(FontInfo & font, ColorCode color, bool really_change_color) - : Changer(font), change_(really_change_color) + : Changer(font, font.color()), change_(really_change_color) { if (change_) { - save_ = font.color(); font.setColor(color); } }