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())
{}
#include "FormFloat.h"
#include "form_float.h"
#include "support/lstrings.h"
+#include "xforms_helpers.h"
typedef FormCB<ControlFloat, FormDB<FD_form_float> > base_class;
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);
}
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;
// 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;