logic: Made history menu use on Messages instead of SearchMatch
* Common base class MessageActivateBase for activation messages with getter for SearchMatches * Removed duplicate logic for creating SearchMatches from Messages * Fixed can't reactivate fulltext search from history menu * Renamed history message and moved to sub directory * Fixed activating node type filters didn't clear code view
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include <QLabel>
|
||||
#include <QScrollBar>
|
||||
|
||||
#include "utility/messaging/type/MessageToUndoRedoPosition.h"
|
||||
#include "utility/messaging/type/history/MessageHistoryToPosition.h"
|
||||
#include "utility/ResourcePaths.h"
|
||||
#include "utility/utilityString.h"
|
||||
|
||||
@@ -168,7 +168,7 @@ void QtHistoryList::onItemClicked(QListWidgetItem *item)
|
||||
{
|
||||
if (historyItem->index != m_currentIndex)
|
||||
{
|
||||
MessageToUndoRedoPosition(historyItem->index).dispatch();
|
||||
MessageHistoryToPosition(historyItem->index).dispatch();
|
||||
}
|
||||
close();
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <QHBoxLayout>
|
||||
|
||||
#include "utility/messaging/type/MessageSearch.h"
|
||||
#include "utility/messaging/type/MessageActivateAll.h"
|
||||
#include "utility/ResourcePaths.h"
|
||||
|
||||
#include "qt/element/QtSearchBarButton.h"
|
||||
@@ -96,5 +96,5 @@ void QtSearchBar::refreshStyle()
|
||||
|
||||
void QtSearchBar::homeButtonClicked()
|
||||
{
|
||||
MessageSearch({ SearchMatch::createCommand(SearchMatch::COMMAND_ALL) }).dispatch();
|
||||
MessageActivateAll().dispatch();
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
#include "component/view/GraphViewStyle.h"
|
||||
#include "data/NodeTypeSet.h"
|
||||
#include "settings/ColorScheme.h"
|
||||
#include "utility/messaging/type/MessageActivateFullTextSearch.h"
|
||||
#include "utility/messaging/type/MessageSearch.h"
|
||||
#include "utility/messaging/type/MessageSearchFullText.h"
|
||||
#include "utility/messaging/type/MessageSearchAutocomplete.h"
|
||||
#include "utility/utility.h"
|
||||
#include "utility/utilityString.h"
|
||||
@@ -89,7 +89,7 @@ void QtSmartSearchBox::fullTextSearch()
|
||||
caseSensitive = true;
|
||||
}
|
||||
|
||||
MessageSearchFullText(term, caseSensitive).dispatch();
|
||||
MessageActivateFullTextSearch(term, caseSensitive).dispatch();
|
||||
}
|
||||
|
||||
QtSmartSearchBox::QtSmartSearchBox(QWidget* parent)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <QMovie>
|
||||
|
||||
#include "qt/utility/utilityQt.h"
|
||||
#include "utility/messaging/type/MessageSearch.h"
|
||||
#include "utility/messaging/type/error/MessageErrorsAll.h"
|
||||
#include "utility/messaging/type/MessageShowStatus.h"
|
||||
#include "utility/ResourcePaths.h"
|
||||
|
||||
@@ -118,5 +118,5 @@ void QtStatusBar::showStatus()
|
||||
|
||||
void QtStatusBar::showErrors()
|
||||
{
|
||||
MessageSearch({ SearchMatch::createCommand(SearchMatch::COMMAND_ERROR) }).dispatch();
|
||||
MessageErrorsAll().dispatch();
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
#include <QHBoxLayout>
|
||||
#include <QTimer>
|
||||
|
||||
#include "utility/messaging/type/MessageUndo.h"
|
||||
#include "utility/messaging/type/MessageRedo.h"
|
||||
#include "utility/messaging/type/history/MessageHistoryUndo.h"
|
||||
#include "utility/messaging/type/history/MessageHistoryRedo.h"
|
||||
#include "utility/ResourcePaths.h"
|
||||
|
||||
#include "qt/element/QtHistoryList.h"
|
||||
@@ -91,7 +91,7 @@ void QtUndoRedo::undoReleased()
|
||||
if (m_pressed)
|
||||
{
|
||||
m_pressed = false;
|
||||
MessageUndo().dispatch();
|
||||
MessageHistoryUndo().dispatch();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ void QtUndoRedo::redoReleased()
|
||||
if (m_pressed)
|
||||
{
|
||||
m_pressed = false;
|
||||
MessageRedo().dispatch();
|
||||
MessageHistoryRedo().dispatch();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user