From 29cfbe0f66b304a82c4f16ed006fc8c46a8391af Mon Sep 17 00:00:00 2001 From: Eberhard Graether Date: Tue, 30 May 2017 23:11:20 +0200 Subject: [PATCH] logic: error limit and better user experience (issue #385) * only show up to 1000 errors in table and code view * click button in bottom right of error table to show all * same error order in code and table * highlight error line when switching reference in code view * improved error view performance bug id = 385 --- bin/app/data/gui/error_view/error_view.css | 0 .../component/controller/CodeController.cpp | 4 +- .../component/controller/ErrorController.cpp | 27 +++++- src/lib/component/view/ErrorView.h | 4 + .../view/helper/CodeSnippetParams.cpp | 6 ++ .../component/view/helper/CodeSnippetParams.h | 1 + src/lib/data/ErrorFilter.h | 3 + src/lib/data/PersistentStorage.cpp | 47 +++++++-- src/lib/data/PersistentStorage.h | 5 +- src/lib/data/access/StorageAccess.h | 5 +- src/lib/data/access/StorageAccessProxy.cpp | 8 +- src/lib/data/access/StorageAccessProxy.h | 5 +- .../utility/messaging/type/MessageNewErrors.h | 5 +- .../messaging/type/MessageShowErrors.h | 3 +- src/lib_gui/qt/element/QtCodeNavigator.cpp | 6 ++ src/lib_gui/qt/element/QtTable.cpp | 25 +++-- src/lib_gui/qt/element/QtTable.h | 2 + src/lib_gui/qt/view/QtErrorView.cpp | 96 +++++++++++++------ src/lib_gui/qt/view/QtErrorView.h | 20 +++- src/lib_gui/qt/view/QtStatusView.cpp | 7 +- 20 files changed, 204 insertions(+), 75 deletions(-) delete mode 100644 bin/app/data/gui/error_view/error_view.css diff --git a/bin/app/data/gui/error_view/error_view.css b/bin/app/data/gui/error_view/error_view.css deleted file mode 100644 index e69de29b..00000000 diff --git a/src/lib/component/controller/CodeController.cpp b/src/lib/component/controller/CodeController.cpp index 792feb1b..4cb1763c 100644 --- a/src/lib/component/controller/CodeController.cpp +++ b/src/lib/component/controller/CodeController.cpp @@ -388,9 +388,11 @@ void CodeController::handleMessage(MessageShowErrors* message) if (!view->showsErrors() || !message->errorId) { std::vector errors; - m_collection = m_storageAccess->getErrorSourceLocations(&errors); + m_collection = m_storageAccess->getErrorSourceLocationsLimited(&errors); std::vector snippets = getSnippetsForCollection(m_collection); + std::sort(snippets.begin(), snippets.end(), CodeSnippetParams::sortById); + view->clear(); view->setErrorInfos(errors); view->showCodeSnippets( diff --git a/src/lib/component/controller/ErrorController.cpp b/src/lib/component/controller/ErrorController.cpp index 2df3d2e3..80ba6da1 100644 --- a/src/lib/component/controller/ErrorController.cpp +++ b/src/lib/component/controller/ErrorController.cpp @@ -14,19 +14,36 @@ ErrorController::~ErrorController() void ErrorController::handleMessage(MessageClearErrorCount* message) { clear(); + + getView()->resetErrorLimit(); } void ErrorController::handleMessage(MessageFinishedParsing* message) { clear(); - getView()->addErrors(m_storageAccess->getErrors(), false); + getView()->setErrorCount(m_storageAccess->getErrorCount()); + getView()->addErrors(m_storageAccess->getErrorsLimited(), false); } void ErrorController::handleMessage(MessageNewErrors* message) { - getView()->addErrors(message->errors, true); - getView()->showDockWidget(); + ErrorFilter filter; + int room = message->errors.size() + filter.limit - message->errorCount.total; + if (room > 0) + { + std::vector errors = message->errors; + if (room < int(errors.size())) + { + errors.resize(room); + } + + getView()->addErrors(message->errors, true); + getView()->showDockWidget(); + } + + getView()->setErrorCount(message->errorCount); + } void ErrorController::handleMessage(MessageShowErrors* message) @@ -39,11 +56,13 @@ void ErrorController::handleMessage(MessageShowErrors* message) clear(); - std::vector errors = m_storageAccess->getErrors(); + std::vector errors = m_storageAccess->getErrorsLimited(); if (errors.size()) { getView()->showDockWidget(); } + + getView()->setErrorCount(message->errorCount); getView()->addErrors(errors, false); } diff --git a/src/lib/component/view/ErrorView.h b/src/lib/component/view/ErrorView.h index 237170eb..0b8459a3 100644 --- a/src/lib/component/view/ErrorView.h +++ b/src/lib/component/view/ErrorView.h @@ -4,6 +4,7 @@ #include #include "component/view/View.h" +#include "data/ErrorCountInfo.h" #include "data/ErrorInfo.h" class ErrorView @@ -19,6 +20,9 @@ public: virtual void addErrors(const std::vector& errors, bool scrollTo) = 0; virtual void setErrorId(Id errorId) = 0; + + virtual void setErrorCount(ErrorCountInfo info) = 0; + virtual void resetErrorLimit() = 0; }; #endif // ERROR_VIEW_H diff --git a/src/lib/component/view/helper/CodeSnippetParams.cpp b/src/lib/component/view/helper/CodeSnippetParams.cpp index b08e9e18..f3dfe4a7 100644 --- a/src/lib/component/view/helper/CodeSnippetParams.cpp +++ b/src/lib/component/view/helper/CodeSnippetParams.cpp @@ -68,3 +68,9 @@ bool CodeSnippetParams::sort(const CodeSnippetParams& a, const CodeSnippetParams return a.startLineNumber < b.startLineNumber; } + +bool CodeSnippetParams::sortById(const CodeSnippetParams& a, const CodeSnippetParams& b) +{ + return a.locationFile->getSourceLocations().begin()->get()->getLocationId() < + b.locationFile->getSourceLocations().begin()->get()->getLocationId(); +} diff --git a/src/lib/component/view/helper/CodeSnippetParams.h b/src/lib/component/view/helper/CodeSnippetParams.h index 2ccc4ff4..6370e19f 100644 --- a/src/lib/component/view/helper/CodeSnippetParams.h +++ b/src/lib/component/view/helper/CodeSnippetParams.h @@ -14,6 +14,7 @@ struct CodeSnippetParams // comparefunction for snippetsorting static bool sort(const CodeSnippetParams& a, const CodeSnippetParams& b); + static bool sortById(const CodeSnippetParams& a, const CodeSnippetParams& b); uint startLineNumber; uint endLineNumber; diff --git a/src/lib/data/ErrorFilter.h b/src/lib/data/ErrorFilter.h index 6413c1ba..e3696f03 100644 --- a/src/lib/data/ErrorFilter.h +++ b/src/lib/data/ErrorFilter.h @@ -11,6 +11,7 @@ struct ErrorFilter , fatal(true) , unindexedError(false) , unindexedFatal(true) + , limit(1000) { } @@ -32,6 +33,8 @@ struct ErrorFilter bool unindexedError; bool unindexedFatal; + + size_t limit; }; #endif // ERROR_FILTER_H diff --git a/src/lib/data/PersistentStorage.cpp b/src/lib/data/PersistentStorage.cpp index 2e132db2..d5d74ca3 100644 --- a/src/lib/data/PersistentStorage.cpp +++ b/src/lib/data/PersistentStorage.cpp @@ -417,7 +417,10 @@ void PersistentStorage::finishInjection() if (m_preInjectionErrorCount != errors.size()) { - MessageNewErrors(std::vector(errors.begin() + m_preInjectionErrorCount, errors.end())).dispatchImmediately(); + MessageNewErrors( + std::vector(errors.begin() + m_preInjectionErrorCount, errors.end()), + getErrorCount(errors) + ).dispatch(); } } @@ -1424,10 +1427,14 @@ StorageStats PersistentStorage::getStorageStats() const } ErrorCountInfo PersistentStorage::getErrorCount() const +{ + return getErrorCount(getErrors()); +} + +ErrorCountInfo PersistentStorage::getErrorCount(const std::vector& errors) const { ErrorCountInfo info; - std::vector errors = getErrors(); for (const ErrorInfo& error : errors) { info.total++; @@ -1443,21 +1450,40 @@ ErrorCountInfo PersistentStorage::getErrorCount() const std::vector PersistentStorage::getErrors() const { - std::vector errors = m_sqliteIndexStorage.getAll(); - std::vector filteredErrors; + std::vector errors; - for (const ErrorInfo& error : errors) + for (const ErrorInfo& error : m_sqliteIndexStorage.getAll()) { if (m_errorFilter.filter(error)) { - filteredErrors.push_back(error); + errors.push_back(error); } } - return filteredErrors; + return errors; } -std::shared_ptr PersistentStorage::getErrorSourceLocations(std::vector* errors) const +std::vector PersistentStorage::getErrorsLimited() const +{ + std::vector errors; + + for (const ErrorInfo& error : m_sqliteIndexStorage.getAll()) + { + if (m_errorFilter.filter(error)) + { + errors.push_back(error); + } + + if (m_errorFilter.limit > 0 && errors.size() >= m_errorFilter.limit) + { + break; + } + } + + return errors; +} + +std::shared_ptr PersistentStorage::getErrorSourceLocationsLimited(std::vector* errors) const { TRACE(); @@ -1482,6 +1508,11 @@ std::shared_ptr PersistentStorage::getErrorSourceLocat error.columnNumber ); } + + if (m_errorFilter.limit > 0 && errors->size() >= m_errorFilter.limit) + { + break; + } } addCompleteFlagsToSourceLocationCollection(collection.get()); diff --git a/src/lib/data/PersistentStorage.h b/src/lib/data/PersistentStorage.h index 71441270..0e34f7db 100644 --- a/src/lib/data/PersistentStorage.h +++ b/src/lib/data/PersistentStorage.h @@ -131,9 +131,10 @@ public: virtual StorageStats getStorageStats() const; virtual ErrorCountInfo getErrorCount() const; + virtual ErrorCountInfo getErrorCount(const std::vector& errors) const; virtual std::vector getErrors() const; - - virtual std::shared_ptr getErrorSourceLocations(std::vector* errors) const; + virtual std::vector getErrorsLimited() const; + virtual std::shared_ptr getErrorSourceLocationsLimited(std::vector* errors) const; private: Id getFileNodeId(const FilePath& filePath) const; diff --git a/src/lib/data/access/StorageAccess.h b/src/lib/data/access/StorageAccess.h index 20923731..3af197b5 100644 --- a/src/lib/data/access/StorageAccess.h +++ b/src/lib/data/access/StorageAccess.h @@ -72,9 +72,8 @@ public: virtual StorageStats getStorageStats() const = 0; virtual ErrorCountInfo getErrorCount() const = 0; - virtual std::vector getErrors() const = 0; - - virtual std::shared_ptr getErrorSourceLocations(std::vector* errors) const = 0; + virtual std::vector getErrorsLimited() const = 0; + virtual std::shared_ptr getErrorSourceLocationsLimited(std::vector* errors) const = 0; virtual void setErrorFilter(const ErrorFilter& filter); diff --git a/src/lib/data/access/StorageAccessProxy.cpp b/src/lib/data/access/StorageAccessProxy.cpp index 4532f842..71c7bdb6 100644 --- a/src/lib/data/access/StorageAccessProxy.cpp +++ b/src/lib/data/access/StorageAccessProxy.cpp @@ -300,21 +300,21 @@ ErrorCountInfo StorageAccessProxy::getErrorCount() const return ErrorCountInfo(); } -std::vector StorageAccessProxy::getErrors() const +std::vector StorageAccessProxy::getErrorsLimited() const { if (hasSubject()) { - return m_subject->getErrors();; + return m_subject->getErrorsLimited(); } return std::vector(); } -std::shared_ptr StorageAccessProxy::getErrorSourceLocations(std::vector* errors) const +std::shared_ptr StorageAccessProxy::getErrorSourceLocationsLimited(std::vector* errors) const { if (hasSubject()) { - return m_subject->getErrorSourceLocations(errors); + return m_subject->getErrorSourceLocationsLimited(errors); } return std::make_shared(); diff --git a/src/lib/data/access/StorageAccessProxy.h b/src/lib/data/access/StorageAccessProxy.h index c4d9f9dd..a95ec740 100644 --- a/src/lib/data/access/StorageAccessProxy.h +++ b/src/lib/data/access/StorageAccessProxy.h @@ -64,9 +64,8 @@ public: virtual StorageStats getStorageStats() const; virtual ErrorCountInfo getErrorCount() const; - virtual std::vector getErrors() const; - - virtual std::shared_ptr getErrorSourceLocations(std::vector* errors) const; + virtual std::vector getErrorsLimited() const; + virtual std::shared_ptr getErrorSourceLocationsLimited(std::vector* errors) const; virtual Id addNodeBookmark(const NodeBookmark& bookmark); virtual Id addEdgeBookmark(const EdgeBookmark& bookmark); diff --git a/src/lib/utility/messaging/type/MessageNewErrors.h b/src/lib/utility/messaging/type/MessageNewErrors.h index f86d2269..48e7ab15 100644 --- a/src/lib/utility/messaging/type/MessageNewErrors.h +++ b/src/lib/utility/messaging/type/MessageNewErrors.h @@ -3,14 +3,16 @@ #include "utility/messaging/Message.h" +#include "data/ErrorCountInfo.h" #include "data/ErrorInfo.h" class MessageNewErrors : public Message { public: - MessageNewErrors(const std::vector& errors) + MessageNewErrors(const std::vector& errors, ErrorCountInfo errorCount) : errors(errors) + , errorCount(errorCount) { setSendAsTask(false); } @@ -26,6 +28,7 @@ public: } const std::vector errors; + const ErrorCountInfo errorCount; }; #endif // MESSAGE_NEW_ERRORS_H diff --git a/src/lib/utility/messaging/type/MessageShowErrors.h b/src/lib/utility/messaging/type/MessageShowErrors.h index 20f41988..72038c4e 100644 --- a/src/lib/utility/messaging/type/MessageShowErrors.h +++ b/src/lib/utility/messaging/type/MessageShowErrors.h @@ -1,9 +1,10 @@ #ifndef MESSAGE_SHOW_ERRORS_H #define MESSAGE_SHOW_ERRORS_H -#include "data/ErrorCountInfo.h" #include "utility/messaging/Message.h" +#include "data/ErrorCountInfo.h" + class MessageShowErrors : public Message { diff --git a/src/lib_gui/qt/element/QtCodeNavigator.cpp b/src/lib_gui/qt/element/QtCodeNavigator.cpp index a87b22e1..5b2ffba3 100644 --- a/src/lib_gui/qt/element/QtCodeNavigator.cpp +++ b/src/lib_gui/qt/element/QtCodeNavigator.cpp @@ -10,6 +10,7 @@ #include "utility/logging/logging.h" #include "utility/messaging/type/MessageCodeViewExpandedInitialFiles.h" #include "utility/messaging/type/MessageScrollCode.h" +#include "utility/messaging/type/MessageShowErrors.h" #include "utility/ResourcePaths.h" #include "data/location/SourceLocation.h" @@ -860,6 +861,11 @@ void QtCodeNavigator::handleMessage(MessageShowReference* message) requestScroll(ref.filePath, 0, ref.locationId, message->animated, false); emit scrollRequest(); + + if (ref.locationType == LOCATION_ERROR) + { + MessageShowErrors(ref.tokenId).dispatch(); + } } updateRefLabel(); diff --git a/src/lib_gui/qt/element/QtTable.cpp b/src/lib_gui/qt/element/QtTable.cpp index 5b32e488..5771c110 100644 --- a/src/lib_gui/qt/element/QtTable.cpp +++ b/src/lib_gui/qt/element/QtTable.cpp @@ -80,31 +80,23 @@ void QtTable::updateRows() verticalHeader()->setStyleSheet("::section { width: " + QString::number(width) + "px; }"); verticalHeader()->setDefaultSectionSize(ApplicationSettings::getInstance()->getFontSize() + 6); - if (this->selectionModel()->hasSelection()) + if (this->selectionModel()->hasSelection() && selectionModel()->selection().indexes()[0].row() >= model()->rowCount() - 2) { - if (selectionModel()->selection().indexes()[0].row() >= model()->rowCount() - 2) - { - clearSelection(); - showLastRow(); - } - } - else - { - showLastRow(); + clearSelection(); } } int QtTable::getFilledRowCount() { - for (int i = 0; i < model()->rowCount(); i++) + for (int i = model()->rowCount() - 1; i >= 0; i--) { - if (model()->index(i, 0).data(Qt::DisplayRole).toString().isEmpty()) + if (!model()->index(i, 0).data(Qt::DisplayRole).toString().isEmpty()) { - return i; + return i + 1; } } - return model()->rowCount(); + return 0; } void QtTable::showFirstRow() @@ -120,6 +112,11 @@ void QtTable::showLastRow() } } +bool QtTable::hasSelection() const +{ + return this->selectionModel()->hasSelection(); +} + void QtTable::resizeEvent(QResizeEvent* event) { QTableView::resizeEvent(event); diff --git a/src/lib_gui/qt/element/QtTable.h b/src/lib_gui/qt/element/QtTable.h index d0ed42b7..38b3b77d 100644 --- a/src/lib_gui/qt/element/QtTable.h +++ b/src/lib_gui/qt/element/QtTable.h @@ -19,6 +19,8 @@ public: void showFirstRow(); void showLastRow(); + bool hasSelection() const; + protected: virtual void resizeEvent(QResizeEvent* event); diff --git a/src/lib_gui/qt/view/QtErrorView.cpp b/src/lib_gui/qt/view/QtErrorView.cpp index ed1fee15..d9782ebb 100644 --- a/src/lib_gui/qt/view/QtErrorView.cpp +++ b/src/lib_gui/qt/view/QtErrorView.cpp @@ -5,8 +5,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -107,13 +109,38 @@ void QtErrorView::initView() QBoxLayout* checkboxes = new QHBoxLayout(); checkboxes->addSpacing(15); - m_showFatals = createFilterCheckbox("fatals", true, checkboxes); - m_showErrors = createFilterCheckbox("errors", true, checkboxes); - m_showNonIndexedFatals = createFilterCheckbox("fatals in non-indexed files", true, checkboxes); - m_showNonIndexedErrors = createFilterCheckbox("errors in non-indexed files", false, checkboxes); + { + m_showFatals = createFilterCheckbox("fatals", m_errorFilter.fatal, checkboxes); + m_showErrors = createFilterCheckbox("errors", m_errorFilter.error, checkboxes); + m_showNonIndexedFatals = createFilterCheckbox("fatals in non-indexed files", m_errorFilter.unindexedFatal, checkboxes); + m_showNonIndexedErrors = createFilterCheckbox("errors in non-indexed files", m_errorFilter.unindexedError, checkboxes); + } checkboxes->addStretch(); + { + m_allLabel = new QLabel(""); + checkboxes->addWidget(m_allLabel); + m_allLabel->hide(); + } + + checkboxes->addSpacing(5); + + { + m_allButton = new QPushButton(""); + connect(m_allButton, &QPushButton::clicked, + [=]() + { + m_errorFilter.limit = 0; + errorFilterChanged(); + } + ); + checkboxes->addWidget(m_allButton); + m_allButton->hide(); + } + + checkboxes->addSpacing(10); + layout->addLayout(checkboxes); doRefreshView(); @@ -139,6 +166,39 @@ void QtErrorView::setErrorId(Id errorId) m_setErrorIdFunctor(errorId); } +void QtErrorView::setErrorCount(ErrorCountInfo info) +{ + m_onQtThread( + [=]() + { + m_allLabel->setVisible(m_errorFilter.limit > 0 && info.total > m_errorFilter.limit); + m_allButton->setVisible(m_errorFilter.limit > 0 && info.total > m_errorFilter.limit); + + m_allLabel->setText("Only showing first " + QString::number(m_errorFilter.limit) + " errors"); + m_allButton->setText("show all " + QString::number(info.total)); + } + ); +} + +void QtErrorView::resetErrorLimit() +{ + ErrorFilter filter; + m_errorFilter.limit = filter.limit; + errorFilterChanged(); +} + +void QtErrorView::errorFilterChanged(int i) +{ + m_table->selectionModel()->clearSelection(); + + m_errorFilter.error = m_showErrors->isChecked(); + m_errorFilter.fatal = m_showFatals->isChecked(); + m_errorFilter.unindexedError = m_showNonIndexedErrors->isChecked(); + m_errorFilter.unindexedFatal = m_showNonIndexedFatals->isChecked(); + + MessageErrorFilterChanged(m_errorFilter).dispatch(); +} + void QtErrorView::doRefreshView() { setStyleSheet(); @@ -151,16 +211,16 @@ void QtErrorView::doClear() m_model->removeRows(0, m_model->rowCount()); } - m_errors.clear(); + m_table->updateRows(); } void QtErrorView::doAddErrors(const std::vector& errors, bool scrollTo) { for (const ErrorInfo& error : errors) { - m_errors.push_back(error); addErrorToTable(error); } + m_table->updateRows(); if (scrollTo) { @@ -191,19 +251,12 @@ void QtErrorView::setStyleSheet() const QPalette palette(m_showErrors->palette()); palette.setColor(QPalette::WindowText, QColor(ColorScheme::getInstance()->getColor("table/text/normal").c_str())); - //palette.setColor(QPalette::Text, QColor(ColorScheme::getInstance()->getColor("error/text/normal").c_str())); - //palette.setColor(QPalette::ButtonText, QColor(ColorScheme::getInstance()->getColor("error/text/normal").c_str())); - //m_showErrors->setAutoFillBackground(true); m_showErrors->setPalette(palette); m_showFatals->setPalette(palette); m_showNonIndexedErrors->setPalette(palette); m_showNonIndexedFatals->setPalette(palette); - //widget->setStyleSheet( - //utility::getStyleSheet(ResourcePaths::getGuiPath() + "error_view/error_view.css").c_str() - //); - m_table->updateRows(); } @@ -235,8 +288,6 @@ void QtErrorView::addErrorToTable(const ErrorInfo& error) m_model->setItem(rowNumber, COLUMN::INDEXED, new QStandardItem(error.indexed ? "yes" : "no")); m_model->setItem(rowNumber, COLUMN::ID, new QStandardItem(QString::number(error.id))); - - m_table->updateRows(); } QCheckBox* QtErrorView::createFilterCheckbox(const QString& name, bool checked, QBoxLayout* layout) @@ -244,20 +295,7 @@ QCheckBox* QtErrorView::createFilterCheckbox(const QString& name, bool checked, QCheckBox* checkbox = new QCheckBox(name); checkbox->setChecked(checked); - connect(checkbox, &QCheckBox::stateChanged, - [=](int) - { - m_table->selectionModel()->clearSelection(); - - ErrorFilter filter; - filter.error = m_showErrors->isChecked(); - filter.fatal = m_showFatals->isChecked(); - filter.unindexedError = m_showNonIndexedErrors->isChecked(); - filter.unindexedFatal = m_showNonIndexedFatals->isChecked(); - - MessageErrorFilterChanged(filter).dispatch(); - } - ); + connect(checkbox, SIGNAL(stateChanged(int)), this, SLOT(errorFilterChanged(int))); layout->addWidget(checkbox); layout->addSpacing(25); diff --git a/src/lib_gui/qt/view/QtErrorView.h b/src/lib_gui/qt/view/QtErrorView.h index c618d9e1..e7931ba4 100644 --- a/src/lib_gui/qt/view/QtErrorView.h +++ b/src/lib_gui/qt/view/QtErrorView.h @@ -4,11 +4,13 @@ #include #include "component/view/ErrorView.h" +#include "data/ErrorFilter.h" #include "qt/utility/QtThreadedFunctor.h" class QBoxLayout; class QCheckBox; -class QPalette; +class QLabel; +class QPushButton; class QStandardItemModel; class QtTable; @@ -32,6 +34,12 @@ public: virtual void addErrors(const std::vector& errors, bool scrollTo); virtual void setErrorId(Id errorId); + virtual void setErrorCount(ErrorCountInfo info); + virtual void resetErrorLimit(); + +private slots: + void errorFilterChanged(int i = 0); + private: enum COLUMN { TYPE = 0, @@ -61,6 +69,13 @@ private: QtThreadedFunctor&, bool> m_addErrorsFunctor; QtThreadedFunctor m_setErrorIdFunctor; + QtThreadedLambdaFunctor m_onQtThread; + + ErrorFilter m_errorFilter; + + QLabel* m_allLabel; + QPushButton* m_allButton; + QCheckBox* m_showErrors; QCheckBox* m_showFatals; QCheckBox* m_showNonIndexedErrors; @@ -69,9 +84,6 @@ private: QStandardItemModel* m_model; QtTable* m_table; - std::vector m_errors; - QPalette* m_palette; - bool m_ignoreRowSelection; }; diff --git a/src/lib_gui/qt/view/QtStatusView.cpp b/src/lib_gui/qt/view/QtStatusView.cpp index fb28ec76..b91d11a5 100644 --- a/src/lib_gui/qt/view/QtStatusView.cpp +++ b/src/lib_gui/qt/view/QtStatusView.cpp @@ -74,7 +74,7 @@ void QtStatusView::initView() ); filters->addWidget(clearButton); - filters->addSpacing(15); + filters->addSpacing(10); layout->addLayout(filters); @@ -153,6 +153,11 @@ void QtStatusView::doAddStatus(const std::vector& status) } m_table->updateRows(); + + if (!m_table->hasSelection()) + { + m_table->showLastRow(); + } } void QtStatusView::setStyleSheet() const