[LyX/master] Polish
Richard Kimberly Heck
rikiheck at lyx.org
Fri Aug 25 00:12:13 UTC 2023
commit e8f8239f6848a30fc508e732a4260054796073bf
Author: Richard Kimberly Heck <rikiheck at lyx.org>
Date: Sun Jul 30 13:46:20 2023 -0400
Polish
---
src/insets/InsetLabel.h | 8 ++++----
src/insets/InsetRef.cpp | 15 +++++++++------
2 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/src/insets/InsetLabel.h b/src/insets/InsetLabel.h
index 91189e5..680b580 100644
--- a/src/insets/InsetLabel.h
+++ b/src/insets/InsetLabel.h
@@ -31,12 +31,12 @@ public:
docstring const & prettyCounter() const { return pretty_counter_; }
///
docstring const & formattedCounter() const { return formatted_counter_; }
- ///
- void setCounterValue(docstring cv) { counter_value_ = cv; }
+ ///
+ void setCounterValue(docstring cv) { counter_value_ = cv; }
///
void setPrettyCounter(docstring pc) { pretty_counter_ = pc; }
- ///
- void setFormattedCounter(docstring fc) { formatted_counter_ = fc; }
+ ///
+ void setFormattedCounter(docstring fc) { formatted_counter_ = fc; }
///
int rowFlags() const override { return CanBreakBefore | CanBreakAfter; }
/// Updates only the label string, doesn't handle undo nor references.
diff --git a/src/insets/InsetRef.cpp b/src/insets/InsetRef.cpp
index 52e1118..746b9ea 100644
--- a/src/insets/InsetRef.cpp
+++ b/src/insets/InsetRef.cpp
@@ -564,13 +564,16 @@ void InsetRef::addToToc(DocIterator const & cpit, bool output_active,
shared_ptr<Toc> toc2 = backend.toc("brokenrefs");
toc2->push_back(TocItem(cpit, 0, screenLabel(), output_active));
}
- // This InsetRef has already been taken care of in InsetLabel::addToToc().
+
+ // Code for display of formatted references
bool const use_formatted_ref = buffer().params().use_formatted_ref;
- string const & cmd = getCmdName();
- docstring const & ref = getParam("reference");
- if (use_formatted_ref && cmd != "pageref" && cmd != "vpageref"
- && cmd != "vref" && cmd != "labelonly")
- screen_label_ = displayString(ref, cmd);
+ if (use_formatted_ref) {
+ string const & cmd = getCmdName();
+ docstring const & ref = getParam("reference");
+ if (cmd != "pageref" && cmd != "vpageref" && cmd != "vref" &&
+ cmd != "labelonly")
+ screen_label_ = displayString(ref, cmd);
+ }
return;
}
// It seems that this reference does not point to any valid label.
More information about the lyx-cvs
mailing list