mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
remove selection_possible (fix a problem with selections not stucking inside tables)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9347 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3ab0507497
commit
358e068298
@ -1,4 +1,9 @@
|
||||
|
||||
2004-12-06 Alfredo Braunstein <abraunst@lyx.org>
|
||||
|
||||
* lyxfunc.C:
|
||||
* text3.C: remove selection_possible global flag
|
||||
|
||||
2004-12-06 Alfredo Braunstein <abraunst@lyx.org>
|
||||
|
||||
* text2.C (getSelectionSpan): remove
|
||||
|
@ -134,7 +134,6 @@ namespace biblio = lyx::biblio;
|
||||
|
||||
extern BufferList bufferlist;
|
||||
extern LyXServer * lyxserver;
|
||||
extern bool selection_possible;
|
||||
|
||||
extern boost::scoped_ptr<kb_keymap> toplevel_keymap;
|
||||
|
||||
@ -615,7 +614,6 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
// we have not done anything wrong yet.
|
||||
errorstat = false;
|
||||
dispatch_buffer.erase();
|
||||
selection_possible = false;
|
||||
|
||||
bool update = true;
|
||||
|
||||
|
24
src/text3.C
24
src/text3.C
@ -83,10 +83,6 @@ using std::vector;
|
||||
|
||||
extern string current_layout;
|
||||
|
||||
// the selection possible is needed, that only motion events are
|
||||
// used, where the button press event was on the drawing area too
|
||||
bool selection_possible = false;
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
@ -1084,7 +1080,6 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
|
||||
case LFUN_MOUSE_TRIPLE:
|
||||
if (cmd.button() == mouse_button::button1) {
|
||||
selection_possible = true;
|
||||
cursorHome(cur);
|
||||
cur.resetAnchor();
|
||||
cursorEnd(cur);
|
||||
@ -1095,7 +1090,6 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
|
||||
case LFUN_MOUSE_DOUBLE:
|
||||
if (cmd.button() == mouse_button::button1) {
|
||||
selection_possible = true;
|
||||
selectWord(cur, lyx::WHOLE_WORD_STRICT);
|
||||
bv->haveSelection(cur.selection());
|
||||
}
|
||||
@ -1106,7 +1100,6 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
// Right click on a footnote flag opens float menu
|
||||
if (cmd.button() == mouse_button::button3) {
|
||||
cur.clearSelection();
|
||||
selection_possible = false;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1120,8 +1113,6 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
paste_internally = true;
|
||||
}
|
||||
|
||||
selection_possible = true;
|
||||
|
||||
// Clear the selection
|
||||
cur.clearSelection();
|
||||
|
||||
@ -1137,10 +1128,6 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
// Set cursor here.
|
||||
bv->cursor() = cur;
|
||||
|
||||
// Don't allow selection after a big jump.
|
||||
//if (bv->fitCursor())
|
||||
// selection_possible = false;
|
||||
|
||||
// Insert primary selection with middle mouse
|
||||
// if there is a local selection in the current buffer,
|
||||
// insert this
|
||||
@ -1149,7 +1136,6 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
bv->owner()->dispatch(FuncRequest(LFUN_PASTE));
|
||||
else
|
||||
bv->owner()->dispatch(FuncRequest(LFUN_PASTESELECTION, "paragraph"));
|
||||
selection_possible = false;
|
||||
}
|
||||
|
||||
break;
|
||||
@ -1159,14 +1145,6 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
// Only use motion with button 1
|
||||
//if (cmd.button() != mouse_button::button1)
|
||||
// return false;
|
||||
// We want to use only motion events for which
|
||||
// the button press event was on the drawing area too.
|
||||
if (!selection_possible) {
|
||||
lyxerr[Debug::ACTION] << "BufferView::Pimpl::"
|
||||
"dispatch: no selection possible\n";
|
||||
lyxerr << "BufferView::Pimpl::dispatch: no selection possible\n";
|
||||
break;
|
||||
}
|
||||
|
||||
// ignore motions deeper nested than the real anchor
|
||||
LCursor & bvcur = cur.bv().cursor();
|
||||
@ -1205,8 +1183,6 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
}
|
||||
|
||||
case LFUN_MOUSE_RELEASE: {
|
||||
selection_possible = false;
|
||||
|
||||
if (cmd.button() == mouse_button::button2)
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user