X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiSelection.h;h=1567b3e697f5f4734e6bcae98fa30542270686d2;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=7e77da715a85a9bc728b08fb22e1de2c760e184a;hpb=16f4f20fcaac89ceb3b487b962f01b010ccada70;p=lyx.git diff --git a/src/frontends/qt4/GuiSelection.h b/src/frontends/qt4/GuiSelection.h index 7e77da715a..1567b3e697 100644 --- a/src/frontends/qt4/GuiSelection.h +++ b/src/frontends/qt4/GuiSelection.h @@ -11,8 +11,8 @@ * Full author contact details are available in file CREDITS. */ -#ifndef SELECTION_H -#define SELECTION_H +#ifndef GUISELECTION_H +#define GUISELECTION_H #include "frontends/Selection.h" @@ -44,11 +44,18 @@ private Q_SLOTS: void on_dataChanged(); private: - 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 + // or keyboard move. This in turn causes many calls of requestSelection in A + // which interferes with the selecting itself. As a result middle button pasting + // for more instances don't work and debugging is a hell. So we just schedule + // obtaining of selection on the time empty() is actually called. + mutable bool schedule_check_; bool const selection_supported_; }; } // namespace frontend } // namespace lyx -#endif // SELECTION_H +#endif // GUISELECTION_H