Allow to break rows before and after label and index insets

Since they are elements that do not appear in output, there is no
reason to make breaking around them difficult.
This commit is contained in:
Jean-Marc Lasgouttes 2022-06-09 21:29:21 +02:00
parent 254b2b0bfa
commit 9ee952ce14
2 changed files with 4 additions and 0 deletions

View File

@ -43,6 +43,8 @@ public:
static std::string params2string(InsetIndexParams const &);
///
static void string2params(std::string const &, InsetIndexParams &);
///
int rowFlags() const override { return CanBreakBefore | CanBreakAfter; }
private:
///
bool hasSettings() const override;

View File

@ -29,6 +29,8 @@ public:
docstring const & counterValue() const { return counter_value_; }
///
docstring const & prettyCounter() const { return pretty_counter_; }
///
int rowFlags() const override { return CanBreakBefore | CanBreakAfter; }
/// Updates only the label string, doesn't handle undo nor references.
void updateLabel(docstring const & new_label, bool const active = true);
/// Updates the label and the references to it.