mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
stupid me.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25964 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
52d4801f6a
commit
ce9c690503
@ -101,15 +101,14 @@ bool GuiSelection::empty() const
|
||||
if (!selection_supported_)
|
||||
return true;
|
||||
|
||||
bool text_selection_empty;
|
||||
if (schedule_check_) {
|
||||
text_selection_empty = qApp->clipboard()->
|
||||
text_selection_empty_ = qApp->clipboard()->
|
||||
text(QClipboard::Selection).isEmpty();
|
||||
schedule_check_ = false;
|
||||
}
|
||||
|
||||
LYXERR(Debug::SELECTION, "GuiSelection::filled: " << !text_selection_empty);
|
||||
return text_selection_empty;
|
||||
LYXERR(Debug::SELECTION, "GuiSelection::filled: " << !text_selection_empty_);
|
||||
return text_selection_empty_;
|
||||
}
|
||||
|
||||
} // namespace frontend
|
||||
|
@ -44,6 +44,9 @@ private Q_SLOTS:
|
||||
void on_dataChanged();
|
||||
|
||||
private:
|
||||
// Cache which is to speed up selection-status read
|
||||
// (4 calls when openi Edit menu).
|
||||
mutable bool text_selection_empty_;
|
||||
// Direct call clipboard()->text(QClipboard::Selection) inside onDataChanged causes
|
||||
// selection to be obtained. Now imagine the some LyX instance A, when making selection -
|
||||
// each change triggers onDataChange in all others instances for each mouse
|
||||
|
Loading…
Reference in New Issue
Block a user