]> git.lyx.org Git - features.git/commitdiff
- Dump the inset position cache as well
authorAsger Ottar Alstrup <alstrup@lyx.org>
Sat, 21 Oct 2006 10:56:36 +0000 (10:56 +0000)
committerAsger Ottar Alstrup <alstrup@lyx.org>
Sat, 21 Oct 2006 10:56:36 +0000 (10:56 +0000)
- More debugging printing stuff

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

src/BufferView.C
src/coordcache.C
src/coordcache.h
src/frontends/LyXView.C
src/frontends/WorkArea.C
src/insets/insettext.C
src/text2.C

index 401f7c11e2af6d0e380832f6c0f29dd3378fc69d..a448a86534cd91375f03ad40db31755749563a11 100644 (file)
@@ -368,6 +368,8 @@ bool BufferView::update(Update::flags flags)
        if (!buffer_)
                return false;
 
+       lyxerr[Debug::WORKAREA] << "BufferView::update" << std::endl;
+
        // Update macro store
        buffer_->buildMacros();
 
index 8f4e717b3ef780ec01b624da1f20290725099fa1..cd652063d53e137bc877b98b3a431625fff72140 100644 (file)
@@ -76,6 +76,13 @@ CoordCache::dump() const {
                        lyxerr << "\" has point " << p.x_ << "," << p.y_ << std::endl;
                }
        }
+
+       lyxerr << "InsetCache contains:" << std::endl;
+       for (CoordCacheBase<InsetBase>::cache_type::const_iterator i = getInsets().getData().begin(); i != getInsets().getData().end(); ++i) {
+               InsetBase const * inset = (*i).first;
+               Point p = (*i).second;
+               lyxerr << "Inset " << inset << "(" << inset->getInsetName() << ") has point " << p.x_ << "," << p.y_ << std::endl;
+       }
 }
 
 } // namespace lyx
index d5ac02f6eb220ce1f65433195c0118fa6f193507..a14751f6f0375ee70c1ca3e077f5b9387b5d9dcc 100644 (file)
@@ -95,6 +95,9 @@ private:
 
        typedef std::map<T const *, Point> cache_type;
        cache_type data_;
+
+public:
+       cache_type const & getData() const { return data_; }
 };
 
 /**
index 57893bce24e7e1f5692bcc17308f33a2eded2228..b27c02c2ec56dd301802142e9c4e6c2d8b5bf2f0 100644 (file)
@@ -96,6 +96,7 @@ void LyXView::setWorkArea(WorkArea * work_area)
 
 void LyXView::redrawWorkArea()
 {
+       lyxerr[Debug::WORKAREA] << "redrawWorkArea" << std::endl;
        work_area_->redraw();
        updateStatusBar();
 }
index b34eaa969e0d491b3f5569b3897732a8540e1332..222fe48a7b761687f5816746c48f8554746df0ff 100644 (file)
@@ -216,7 +216,7 @@ void WorkArea::redraw()
        greyed_out_ = false;
        getPainter().start();
        paintText(*buffer_view_, vi, getPainter());
-       lyxerr[Debug::DEBUG] << "Redraw screen" << endl;
+       lyxerr[Debug::WORKAREA] << "WorkArea::redraw screen" << endl;
        int const ymin = std::max(vi.y1, 0);
        int const ymax =
                ( vi.p2 < vi.size - 1 ?  vi.y2 : height() );
index c6d2b0ca72ced2b60f7214b16e1b52c432bbf00c..f84cf778a7c0d20f3982b2ad8788bed7063c31fa 100644 (file)
@@ -247,7 +247,7 @@ InsetBase * InsetText::editXY(LCursor & cur, int x, int y)
 
 void InsetText::doDispatch(LCursor & cur, FuncRequest & cmd)
 {
-       lyxerr[Debug::DEBUG] << BOOST_CURRENT_FUNCTION
+       lyxerr[Debug::ACTION] << BOOST_CURRENT_FUNCTION
                             << " [ cmd.action = "
                             << cmd.action << ']' << endl;
        setViewCache(&cur.bv());
index d88edd4af99febe4839f81e82f9fadcf58cb8f55..afc507d4707648bf2771123765a6b442a77c8b1f 100644 (file)
@@ -958,6 +958,9 @@ Row const & LyXText::getRowNearY(int y, pit_type pit) const
 // sets cursor recursively descending into nested editable insets
 InsetBase * LyXText::editXY(LCursor & cur, int x, int y)
 {
+       if (lyxerr.debugging(Debug::WORKAREA)) {
+               bv()->coordCache().dump();
+       }
        pit_type pit = getPitNearY(y);
        BOOST_ASSERT(pit != -1);
        Row const & row = getRowNearY(y, pit);