Bug #4626 » 0001-Restore-ClearAndSelect-on-clicks-without-drag.patch
src/Wt/WAbstractItemView | ||
---|---|---|
int rowHeaderCount_;
|
||
WString computedDragMimeType_;
|
||
bool sortEnabled_;
|
||
WModelIndex delayedClearAndSelectIndex_;
|
||
JSignal<int, int> columnWidthChanged_;
|
||
Signal<int, WLength> columnResized_;
|
src/Wt/WAbstractItemView.C | ||
---|---|---|
extendSelection(index);
|
||
else {
|
||
if (!(modifiers & (ControlModifier | MetaModifier))) {
|
||
if (!isSelected(index))
|
||
if (!dragEnabled_)
|
||
select(index, ClearAndSelect);
|
||
else {
|
||
if (!isSelected(index))
|
||
select(index, ClearAndSelect);
|
||
else
|
||
delayedClearAndSelectIndex_ = index;
|
||
}
|
||
} else
|
||
select(index, ToggleSelect);
|
||
}
|
||
... | ... | |
void WAbstractItemView::handleClick(const WModelIndex& index,
|
||
const WMouseEvent& event)
|
||
{
|
||
if (dragEnabled_ && delayedClearAndSelectIndex_.isValid() &&
|
||
(event.dragDelta().x < 4 || event.dragDelta().y < 4)) {
|
||
select(delayedClearAndSelectIndex_, ClearAndSelect);
|
||
}
|
||
bool doEdit = index.isValid() && (editTriggers() & SingleClicked);
|
||
if (doEdit)
|
||
... | ... | |
bool doEdit = index.isValid() &&
|
||
(editTriggers() & SelectedClicked) && isSelected(index);
|
||
delayedClearAndSelectIndex_ = WModelIndex();
|
||
if (index.isValid())
|
||
selectionHandleClick(index, event.modifiers());
|
||