Up to now it was hell to debug it, since the selection messages was under different
debug classes and the messages also get completely lost from mouse action events.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25624
a592a061-630c-0410-9148-
cb99ea01b6c8
if (cur.selection()
&& cur.selBegin() == cur.bv().cursor().selBegin()
&& cur.selEnd() == cur.bv().cursor().selEnd()) {
- LYXERR(Debug::ACTION, "'" << cur.selectionAsString(true) << "'");
+ LYXERR(Debug::SELECTION, "saveSelection: '" << cur.selectionAsString(true) << "'");
copySelectionToStack(cur, selectionBuffer);
}
}
case SelectionRequest: {
if (xev->xselectionrequest.selection != XA_PRIMARY)
break;
- LYXERR(Debug::GUI, "X requested selection.");
+ LYXERR(Debug::SELECTION, "X requested selection.");
BufferView * bv = current_view_->view();
if (bv) {
docstring const sel = bv->requestSelection();
case SelectionClear: {
if (xev->xselectionclear.selection != XA_PRIMARY)
break;
- LYXERR(Debug::GUI, "Lost selection.");
+ LYXERR(Debug::SELECTION, "Lost selection.");
BufferView * bv = current_view_->view();
if (bv)
bv->clearSelection();
{
QString const str = qApp->clipboard()->text(QClipboard::Selection)
.normalized(QString::NormalizationForm_C);
- LYXERR(Debug::ACTION, "GuiSelection::get: " << str);
+ LYXERR(Debug::SELECTION, "GuiSelection::get: " << str);
if (str.isNull())
return docstring();
void GuiSelection::put(docstring const & str)
{
- LYXERR(Debug::ACTION, "GuiSelection::put: " << to_utf8(str));
+ LYXERR(Debug::SELECTION, "GuiSelection::put: " << to_utf8(str));
qApp->clipboard()->setText(toqstr(externalLineEnding(str)),
QClipboard::Selection);
if (!selection_supported_)
return true;
- LYXERR(Debug::ACTION, "GuiSelection::empty: " << text_selection_empty_);
+ LYXERR(Debug::SELECTION, "GuiSelection::empty: " << text_selection_empty_);
return text_selection_empty_;
}
{ Debug::MACROS, "macros", N_("Math macros")},
{ Debug::RTL, "rtl", N_("RTL/Bidi")},
{ Debug::LOCALE, "locale", N_("Locale/Internationalisation")},
+ { Debug::SELECTION, "selection", N_("Selection copy/paste mechanism")},
{ Debug::DEBUG, "debug", N_("Developers' general debug messages")},
{ Debug::ANY, "any", N_("All debugging messages")}
};
/// rtl-related
RTL = (1 << 27),
/// locale related
- LOCALE = (1 << 28),
+ LOCALE = (1 << 28),
+ /// selection
+ SELECTION = (1 << 29),
///
DEBUG = (1 << 31),
///