mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Add Inset::isEnvironment()
This usually returns InsetLayout::isEnvironment(), but listings has specific conditions (depending on whether it is inline or not)
This commit is contained in:
parent
823bb2a8dd
commit
1dc666082e
@ -15,6 +15,7 @@
|
||||
#ifndef INSETBASE_H
|
||||
#define INSETBASE_H
|
||||
|
||||
#include "InsetLayout.h"
|
||||
#include "ColorCode.h"
|
||||
#include "InsetCode.h"
|
||||
#include "LayoutEnums.h"
|
||||
@ -601,6 +602,8 @@ public:
|
||||
virtual void acceptChanges() {}
|
||||
/// reject the changes within the inset
|
||||
virtual void rejectChanges() {}
|
||||
///
|
||||
virtual bool isEnvironment() const { return getLayout().latextype() == InsetLaTeXType::ENVIRONMENT; }
|
||||
|
||||
///
|
||||
virtual bool needsCProtection(bool const, bool const) const { return false; }
|
||||
|
@ -38,6 +38,8 @@ public:
|
||||
static void string2params(std::string const &, InsetListingsParams &);
|
||||
///
|
||||
static std::string params2string(InsetListingsParams const &);
|
||||
///
|
||||
bool isEnvironment() const { return !params().isInline(); }
|
||||
private:
|
||||
///
|
||||
bool isLabeled() const override { return true; }
|
||||
|
Loading…
Reference in New Issue
Block a user