[Performance] Load indicator in views

* Only use load indicator (per default) for DB object views
* In any case disable load indicator for status messages
This commit is contained in:
Klaus Basan
2019-11-10 00:13:41 +01:00
committed by Mat Sutcliffe
parent ad18149c14
commit 964948e3e8
4 changed files with 4 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ namespace BlackGui
{ {
m_menus |= MenuClear; m_menus |= MenuClear;
m_acceptRowSelection = true; m_acceptRowSelection = true;
m_enabledLoadIndicator = false; // for performance reasons
this->menuRemoveItems(MenuRefresh | MenuBackend | MenuToggleSelectionMode); this->menuRemoveItems(MenuRefresh | MenuBackend | MenuToggleSelectionMode);
this->standardInit(new CStatusMessageListModel(this)); this->standardInit(new CStatusMessageListModel(this));
} }

View File

@@ -569,7 +569,7 @@ namespace BlackGui
int m_loadIndicatorTimeoutMsDefault = 30 * 1000; //!< default time for timeout int m_loadIndicatorTimeoutMsDefault = 30 * 1000; //!< default time for timeout
bool m_forceStretchLastColumnWhenResized = true; //!< a small table might (few columns) fail stretching, force again bool m_forceStretchLastColumnWhenResized = true; //!< a small table might (few columns) fail stretching, force again
bool m_showingLoadIndicator = false; //!< showing loading indicator bool m_showingLoadIndicator = false; //!< showing loading indicator
bool m_enabledLoadIndicator = true; //!< loading indicator enabled/disabled bool m_enabledLoadIndicator = false; //!< loading indicator enabled/disabled
bool m_acceptClickSelection = false; //!< clicked bool m_acceptClickSelection = false; //!< clicked
bool m_acceptRowSelection = false; //!< selection changed bool m_acceptRowSelection = false; //!< selection changed
bool m_acceptDoubleClickSelection = false; //!< double clicked bool m_acceptDoubleClickSelection = false; //!< double clicked

View File

@@ -727,6 +727,7 @@ namespace BlackGui
{ {
if (!m_enabledLoadIndicator) { return -1; } if (!m_enabledLoadIndicator) { return -1; }
if (m_showingLoadIndicator) { return -1; } if (m_showingLoadIndicator) { return -1; }
if (this->hasDockWidgetArea()) if (this->hasDockWidgetArea())
{ {
if (!this->isVisibleWidget()) { return -1; } if (!this->isVisibleWidget()) { return -1; }

View File

@@ -45,6 +45,7 @@ namespace BlackGui
CViewBase<ModelClass>(parent) CViewBase<ModelClass>(parent)
{ {
// void // void
CViewBaseNonTemplate::m_enabledLoadIndicator = true; // indicator for DB views
} }
template <class T> template <class T>