mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
Unbreak completion in text mode
Completion uses a complicated async scheme based on timers to update itself. This is probably not necessary anymore and is fragile to event order changes. This is what happens with the new painting scheme. Therefore the asyncHideXXX() methods have to be made more robust and detect whether completion state has changed by the time they are triggered.
This commit is contained in:
parent
51f8ba9d35
commit
f1ea7fee5c
@ -538,7 +538,9 @@ void GuiCompleter::showPopup(Cursor const & cur)
|
|||||||
void GuiCompleter::asyncHidePopup()
|
void GuiCompleter::asyncHidePopup()
|
||||||
{
|
{
|
||||||
popup()->hide();
|
popup()->hide();
|
||||||
if (!inlineVisible())
|
// do not clear model if it has been set by an event before the
|
||||||
|
// timeout got triggered.
|
||||||
|
if (!modelActive_ && !inlineVisible())
|
||||||
model_->setList(0);
|
model_->setList(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -573,7 +575,9 @@ void GuiCompleter::hideInline(Cursor const & cur)
|
|||||||
|
|
||||||
void GuiCompleter::asyncHideInline()
|
void GuiCompleter::asyncHideInline()
|
||||||
{
|
{
|
||||||
if (!popupVisible())
|
// do not clear model if it has been set by an event before the
|
||||||
|
// timeout got triggered.
|
||||||
|
if (!modelActive_ && !popupVisible())
|
||||||
model_->setList(0);
|
model_->setList(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user