]> git.lyx.org Git - lyx.git/commitdiff
Fixup 145af7c2: remove unused method
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 10 Jul 2024 11:42:57 +0000 (13:42 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 10 Jul 2024 11:42:57 +0000 (13:42 +0200)
TextMetrics::firstVisible(), introduced in this commit, is actually unused.

src/TextMetrics.cpp
src/TextMetrics.h

index a63adf5ebb642d7e743d2958fb1f4b5d20d761e8..6ba15b02510a03716506a4e6ebab6b7a31b57854 100644 (file)
@@ -131,17 +131,6 @@ pair<pit_type, ParagraphMetrics const *> TextMetrics::first() const
 }
 
 
-pair<pit_type, ParagraphMetrics const *> TextMetrics::firstVisible() const
-{
-       // This only works in the main text, I think (bottom > 0)
-       LASSERT(text_->isMainText(), return first());
-       auto it = find_if(par_metrics_.begin(), par_metrics_.end(),
-                         [] (ParMetricsCache::value_type const & p) {
-                             return p.second.hasPosition() && p.second.bottom() > 0;
-                         });
-       return make_pair(it->first, &it->second);
-}
-
 pair<pit_type, ParagraphMetrics const *> TextMetrics::last() const
 {
        LBUFERR(!par_metrics_.empty());
index 1a19b4293901a62da0443857be0ee17e9b908dc9..d5606b610a396661046fd56f1a89d5d71acf895f 100644 (file)
@@ -50,8 +50,6 @@ public:
        ///
        std::pair<pit_type, ParagraphMetrics const *> first() const;
        ///
-       std::pair<pit_type, ParagraphMetrics const *> firstVisible() const;
-       ///
        std::pair<pit_type, ParagraphMetrics const *> last() const;
        /// is this row the last in the text?
        bool isLastRow(Row const & row) const;