Le 28/04/2018 à 00:06, Scott Kostyshak a écrit :
On Wed, Apr 25, 2018 at 06:41:36PM +0000, Scott Kostyshak wrote:
it is not 100% reproducible for me. I wonder if valgrind might be useful
to try in this situation.
Attached is a valgrind log. Do the invalid reads provide any clues?
Does this patch help? I have a more complicated approach, but this
should be good enough for now.
JMarc
From 56938fed29932cf22fbf9f586a22736db5e06738 Mon Sep 17 00:00:00 2001
From: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date: Wed, 2 May 2018 15:02:10 +0200
Subject: [PATCH] Recompute metrics before displaying dialogs
This avoids situations where changes have been made, but the metrics
have not been updated before showing for example an error dialog.
---
src/frontends/qt4/GuiView.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp
index a91928c..593bb76 100644
--- a/src/frontends/qt4/GuiView.cpp
+++ b/src/frontends/qt4/GuiView.cpp
@@ -4619,6 +4619,8 @@ void GuiView::doShowDialog(QString const & qname, QString const & qdata,
try {
Dialog * dialog = findOrBuild(name, false);
if (dialog) {
+ if (currentBufferView())
+ currentBufferView()->processUpdateFlags(Update::Force);
bool const visible = dialog->isVisibleView();
dialog->showData(sdata);
if (inset && currentBufferView())
--
2.7.4