Bug #4626 » 0001-Restore-ClearAndSelect-on-clicks-without-drag-v2.patch
src/Wt/WAbstractItemView | ||
---|---|---|
int rowHeaderCount_;
|
||
WString computedDragMimeType_;
|
||
bool sortEnabled_;
|
||
WModelIndex delayedClearAndSelectIndex_;
|
||
JSignal<int, int> columnWidthChanged_;
|
||
Signal<int, WLength> columnResized_;
|
src/Wt/WAbstractItemView.C | ||
---|---|---|
selectionModel_->setSelectionBehavior(oldSelectionModel->selectionBehavior());
|
||
delete oldSelectionModel;
|
||
delayedClearAndSelectIndex_ = WModelIndex();
|
||
editedItems_.clear();
|
||
if (!isReset)
|
||
... | ... | |
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());
|
||
- « Previous
- 1
- 2
- 3
- Next »