logic: Show overview instead of empty error screen after all indexing errors were fixed
This commit is contained in:
@@ -219,7 +219,7 @@ void Application::handleMessage(MessageIndexingFinished* message)
|
|||||||
|
|
||||||
if (m_hasGUI)
|
if (m_hasGUI)
|
||||||
{
|
{
|
||||||
MessageRefreshUI().dispatch();
|
MessageRefreshUI().afterIndexing().dispatch();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -364,7 +364,16 @@ void UndoRedoController::handleMessage(MessageIndexingFinished* message)
|
|||||||
|
|
||||||
void UndoRedoController::handleMessage(MessageRefreshUI* message)
|
void UndoRedoController::handleMessage(MessageRefreshUI* message)
|
||||||
{
|
{
|
||||||
if (m_iterator == m_list.begin())
|
std::list<Command>::iterator startIterator = m_iterator;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
std::advance(startIterator, -1);
|
||||||
|
}
|
||||||
|
while (startIterator != m_list.begin() && startIterator->order != Command::ORDER_ACTIVATE);
|
||||||
|
|
||||||
|
if (startIterator == m_list.begin() ||
|
||||||
|
(message->isAfterIndexing && dynamic_cast<MessageActivateErrors*>(startIterator->message.get()) &&
|
||||||
|
m_storageAccess->getErrorCount().total == 0))
|
||||||
{
|
{
|
||||||
MessageActivateAll msg;
|
MessageActivateAll msg;
|
||||||
msg.setSchedulerId(getSchedulerId());
|
msg.setSchedulerId(getSchedulerId());
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ public:
|
|||||||
|
|
||||||
MessageRefreshUI()
|
MessageRefreshUI()
|
||||||
: loadStyle(true)
|
: loadStyle(true)
|
||||||
|
, isAfterIndexing(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23,6 +24,12 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MessageRefreshUI& afterIndexing()
|
||||||
|
{
|
||||||
|
isAfterIndexing = true;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
void print(std::wostream& os) const override
|
void print(std::wostream& os) const override
|
||||||
{
|
{
|
||||||
if (loadStyle)
|
if (loadStyle)
|
||||||
@@ -32,6 +39,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool loadStyle;
|
bool loadStyle;
|
||||||
|
bool isAfterIndexing;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MESSAGE_REFRESH_UI_H
|
#endif // MESSAGE_REFRESH_UI_H
|
||||||
|
|||||||
Reference in New Issue
Block a user