} else {
// Force the view associated with this model to update when we have more annotations
if (prev_last_row_ < new_row_count) {
- dataChanged(index(prev_last_row_, 0, QModelIndex()),
- index(new_row_count, 0, QModelIndex()));
+ dataChanged(index(prev_last_row_, 0), index(new_row_count, 0));
layoutChanged();
}
}
all_annotations_without_hidden_.resize(count);
- dataChanged(index(0, 0, QModelIndex()), index(count, 0, QModelIndex()));
+ dataChanged(index(0, 0), index(count, 0));
layoutChanged();
}
const char* ViewModeNames[ViewModeCount] = {
"Show all",
- "Show all and focus on newest",
- "Show visible in main view"
+ "Show all and focus on newest"
+// "Show visible in main view"
};
QSize QCustomTableView::minimumSizeHint() const
if (table_view_->horizontalHeader()->isSectionHidden(column))
continue;
- const QModelIndex idx = model_->index(row, column, QModelIndex());
+ const QModelIndex idx = model_->index(row, column);
QString s = model_->data(idx, Qt::DisplayRole).toString();
if (save_type == SaveTypeCSVEscaped)
void View::on_new_annotations()
{
- if (!delayed_view_updater_.isActive())
- delayed_view_updater_.start();
+ if (view_mode_selector_->currentIndex() == ViewModeLatest) {
+ update_data();
+ table_view_->scrollTo(model_->index(model_->rowCount() - 1, 0),
+ QAbstractItemView::PositionAtBottom);
+ } else {
+ if (!delayed_view_updater_.isActive())
+ delayed_view_updater_.start();
+ }
}
void View::on_decoder_reset()