Fix cut/copy enable r=jug ;)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5309 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2002-09-16 12:52:58 +00:00
parent ace20ee51b
commit daff768455
4 changed files with 19 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2002-09-16 John Levon <levon@movementarian.org>
* lyxfunc.C: check tabular for cut/copy too
2002-09-12 John Levon <levon@movementarian.org>
* LyXAction.C: tidy

View File

@ -1,3 +1,7 @@
2002-09-16 John Levon <levon@movementarian.org>
* insettabular.h: hasSelection() needs to be public
2002-09-12 Rob Lahaye <lahaye@snu.ac.kr>
* insetgraphicsParams.C: use empty string as default for rotateOrigin

View File

@ -236,6 +236,10 @@ public:
///
boost::signal0<void> hideDialog;
/// are some cells selected ?
bool hasSelection() const {
return has_selection;
}
private:
///
void lfunMousePress(FuncRequest const &);
@ -285,10 +289,6 @@ private:
///
void removeTabularRow();
///
bool hasSelection() const {
return has_selection;
}
///
void clearSelection() const {
sel_cell_start = sel_cell_end = 0;
has_selection = false;

View File

@ -312,6 +312,13 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & ev) const
break;
case LFUN_CUT:
case LFUN_COPY:
if (tli && tli->lyxCode() == Inset::TABULAR_CODE) {
InsetTabular * t(static_cast<InsetTabular*>(tli));
if (t->hasSelection()) {
disable = false;
break;
}
}
disable = !mathcursor && !view()->getLyXText()->selection.set();
break;
#ifndef HAVE_LIBAIKSAURUS