mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 14:15:32 +00:00
Only draw the preview when previews are activated.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7921 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7e2343e016
commit
6fc6d7e010
@ -1,3 +1,7 @@
|
||||
2003-10-14 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* insetinclude.C (metrics, draw): only draw the preview when previews
|
||||
are activated.
|
||||
|
||||
2003-10-14 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
|
@ -518,7 +518,7 @@ void InsetInclude::fillWithBibKeys(Buffer const & buffer,
|
||||
|
||||
void InsetInclude::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
{
|
||||
if (preview_->previewReady()) {
|
||||
if (RenderPreview::activated() && preview_->previewReady()) {
|
||||
preview_->metrics(mi, dim);
|
||||
} else {
|
||||
if (!set_label_) {
|
||||
@ -542,7 +542,7 @@ void InsetInclude::draw(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
cache(pi.base.bv);
|
||||
|
||||
if (!preview_->previewReady()) {
|
||||
if (!RenderPreview::activated() || !preview_->previewReady()) {
|
||||
button_.draw(pi, x + button_.box().x1, y);
|
||||
return;
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
2003-10-14 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* formula.C (metrics, draw): only draw the preview when previews
|
||||
are activated.
|
||||
|
||||
2003-10-13 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* formula.C (editing_inset): pass a pointer rather than a reference.
|
||||
|
@ -195,6 +195,7 @@ void InsetFormula::draw(PainterInfo & pi, int x, int y) const
|
||||
|
||||
// The previews are drawn only when we're not editing the inset.
|
||||
bool const use_preview = (!editing_inset(this) &&
|
||||
RenderPreview::activated() &&
|
||||
preview_->previewReady());
|
||||
|
||||
int const w = dim_.wid;
|
||||
@ -258,6 +259,7 @@ bool InsetFormula::insetAllowed(InsetOld::Code code) const
|
||||
void InsetFormula::metrics(MetricsInfo & m, Dimension & dim) const
|
||||
{
|
||||
bool const use_preview = (!editing_inset(this) &&
|
||||
RenderPreview::activated() &&
|
||||
preview_->previewReady());
|
||||
|
||||
if (use_preview) {
|
||||
|
Loading…
Reference in New Issue
Block a user