From 1f2b3610677f33bc0e0716f5dce75af5b74e3309 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 3 Jan 2002 13:31:12 +0000 Subject: [PATCH] table selection fix from John; Here & wide figures fix from Michael K. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3284 a592a061-630c-0410-9148-cb99ea01b6c8 --- po/POTFILES.in | 1 - src/frontends/controllers/ChangeLog | 5 +++++ src/frontends/controllers/ControlFloat.C | 6 ++++-- src/frontends/controllers/ControlFloat.h | 4 +++- src/frontends/xforms/ChangeLog | 5 +++++ src/frontends/xforms/FormFloat.C | 2 ++ src/insets/ChangeLog | 4 ++++ src/insets/insettabular.C | 26 ++++++++++++++---------- 8 files changed, 38 insertions(+), 15 deletions(-) diff --git a/po/POTFILES.in b/po/POTFILES.in index d1725fb660..70e9cdc541 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -9,7 +9,6 @@ src/converter.C src/CutAndPaste.C src/debug.C src/exporter.C -src/ext_l10n.h src/figure_form.C src/figureForm.C src/FontLoader.C diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index 066b327fac..8f6cf2d026 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,8 @@ +2001-12-11 Michael A. Koziarski + + * ControlFloat.[Ch]: changes to prevent here definitely being used + with wide figures. + 2001-12-19 Jean-Marc Lasgouttes * ControlThesaurus.h: do not include in header files diff --git a/src/frontends/controllers/ControlFloat.C b/src/frontends/controllers/ControlFloat.C index 47156dc039..ffefc7c0d6 100644 --- a/src/frontends/controllers/ControlFloat.C +++ b/src/frontends/controllers/ControlFloat.C @@ -57,10 +57,12 @@ FloatParams const ControlFloat::getParams(InsetFloat const & inset) FloatParams::FloatParams() - : placement("htbp") + : placement("htbp"), + allow_here_definitely(true) {} FloatParams::FloatParams(InsetFloat const & inset) - : placement(inset.placement()) + : placement(inset.placement()), + allow_here_definitely(!inset.wide()) {} diff --git a/src/frontends/controllers/ControlFloat.h b/src/frontends/controllers/ControlFloat.h index e1dfd8def0..63083eb641 100644 --- a/src/frontends/controllers/ControlFloat.h +++ b/src/frontends/controllers/ControlFloat.h @@ -32,13 +32,15 @@ struct FloatParams { FloatParams(InsetFloat const &); /// string placement; + /// + bool allow_here_definitely; }; inline bool operator==(FloatParams const & p1, FloatParams const & p2) { - return p1.placement == p2.placement; + return p1.placement == p2.placement && p1.allow_here_definitely == p2.allow_here_definitely; } diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 59518a055a..d3f7585dbb 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,8 @@ +2001-12-11 Michael A. Koziarski + + * FormFloat.C: changes to prevent here definitely being used + with wide figures. + 2001-12-29 Dekel Tsur * FormMathsMatrix.C (AlignFilter): Allow entering the '|' char. diff --git a/src/frontends/xforms/FormFloat.C b/src/frontends/xforms/FormFloat.C index b086c544c4..154559f4a7 100644 --- a/src/frontends/xforms/FormFloat.C +++ b/src/frontends/xforms/FormFloat.C @@ -21,6 +21,7 @@ #include "FormFloat.h" #include "form_float.h" #include "support/lstrings.h" +#include "xforms_helpers.h" typedef FormCB > base_class; @@ -105,6 +106,7 @@ void FormFloat::update() fl_set_button(dialog_->radio_page, page); fl_set_button(dialog_->radio_here, here); fl_set_button(dialog_->button_here_definitely, here_definitely); + setEnabled(dialog_->button_here_definitely, controller().params().allow_here_definitely); } diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 423970a702..5630c00d2a 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,7 @@ +2001-12-31 John Levon + + * insettabular.C: correct single-cell select vertically + 2001-12-27 Juergen Vigna * insettabular.C (ascii): export as tab-separated-values if the diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index 6e68763d7d..16623088a1 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -961,14 +961,16 @@ InsetTabular::localDispatch(BufferView * bv, kb_action action, int const ocell = actcell; // if we are starting a selection, only select // the current cell at the beginning - if (hasSelection()) { + if (hasSelection()) { moveDown(bv, false); + if ((ocell == sel_cell_end) || + (tabular->column_of_cell(ocell)>tabular->column_of_cell(actcell))) + setSelection(start, tabular->GetCellBelow(sel_cell_end)); + else + setSelection(start, tabular->GetLastCellBelow(sel_cell_end)); + } else { + setSelection(start, start); } - if ((ocell == sel_cell_end) || - (tabular->column_of_cell(ocell)>tabular->column_of_cell(actcell))) - setSelection(start, tabular->GetCellBelow(sel_cell_end)); - else - setSelection(start, tabular->GetLastCellBelow(sel_cell_end)); updateLocal(bv, SELECTION, false); } break; @@ -986,12 +988,14 @@ InsetTabular::localDispatch(BufferView * bv, kb_action action, // the current cell at the beginning if (hasSelection()) { moveUp(bv, false); + if ((ocell == sel_cell_end) || + (tabular->column_of_cell(ocell)>tabular->column_of_cell(actcell))) + setSelection(start, tabular->GetCellAbove(sel_cell_end)); + else + setSelection(start, tabular->GetLastCellAbove(sel_cell_end)); + } else { + setSelection(start, start); } - if ((ocell == sel_cell_end) || - (tabular->column_of_cell(ocell)>tabular->column_of_cell(actcell))) - setSelection(start, tabular->GetCellAbove(sel_cell_end)); - else - setSelection(start, tabular->GetLastCellAbove(sel_cell_end)); updateLocal(bv, SELECTION, false); } break; -- 2.39.2