]> git.lyx.org Git - features.git/commitdiff
Fix wrapping bug within inset. dim_.wid was not set!
authorAbdelrazak Younes <younes@lyx.org>
Sat, 1 Sep 2007 10:30:44 +0000 (10:30 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sat, 1 Sep 2007 10:30:44 +0000 (10:30 +0000)
Add some commented out debug info.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19972 a592a061-630c-0410-9148-cb99ea01b6c8

src/TextMetrics.cpp

index 8f3c2e194910e57dd7f6da70df8534389f11d764..98fc7256f403a61b98605ad653d3c28f6390ac5e 100644 (file)
@@ -148,9 +148,10 @@ bool TextMetrics::metrics(MetricsInfo & mi, Dimension & dim)
 {
        BOOST_ASSERT(mi.base.textwidth);
        max_width_ = mi.base.textwidth;
+       dim_.wid = max_width_;
 
-       //lyxerr << "Text::metrics: width: " << mi.base.textwidth
-       //      << " maxWidth: " << max_width_ << "\nfont: " << mi.base.font << endl;
+       lyxerr << "Text::metrics: width: " << mi.base.textwidth
+               << " maxWidth: " << max_width_ << "\nfont: " << mi.base.font << endl;
 
        bool changed = false;
 
@@ -299,6 +300,9 @@ void TextMetrics::computeRowMetrics(pit_type const pit,
        Paragraph const & par = text_->getPar(pit);
 
        double w = dim_.wid - row.width();
+       //lyxerr << "\ndim_.wid " << dim_.wid << endl;
+       //lyxerr << "row.width() " << row.width() << endl;
+       //lyxerr << "w " << w << endl;
 
        bool const is_rtl = text_->isRTL(buffer, par);
        if (is_rtl)
@@ -383,6 +387,8 @@ void TextMetrics::computeRowMetrics(pit_type const pit,
                            && !disp_inset
                                ) {
                                row.separator = w / ns;
+                               //lyxerr << "row.separator " << row.separator << endl;
+                               //lyxerr << "ns " << ns << endl;
                        } else if (is_rtl) {
                                row.x += w;
                        }