|
@@ -234,6 +234,20 @@ ModelIndex ColumnsView::index_at_event_position(Gfx::IntPoint const& a_position)
|
|
return {};
|
|
return {};
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void ColumnsView::select_range(ModelIndex const& index)
|
|
|
|
+{
|
|
|
|
+ auto min_row = min(selection_start_index().row(), index.row());
|
|
|
|
+ auto max_row = max(selection_start_index().row(), index.row());
|
|
|
|
+ auto parent = index.parent();
|
|
|
|
+
|
|
|
|
+ clear_selection();
|
|
|
|
+ for (auto row = min_row; row <= max_row; ++row) {
|
|
|
|
+ auto new_index = model()->index(row, m_model_column, parent);
|
|
|
|
+ if (new_index.is_valid())
|
|
|
|
+ toggle_selection(new_index);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
void ColumnsView::mousedown_event(MouseEvent& event)
|
|
void ColumnsView::mousedown_event(MouseEvent& event)
|
|
{
|
|
{
|
|
AbstractView::mousedown_event(event);
|
|
AbstractView::mousedown_event(event);
|