logic: Split MessageRefresh into index and UI
This commit is contained in:
@@ -102,15 +102,12 @@ void QtSelfRefreshIconButton::setIconPath(const FilePath& iconPath)
|
||||
}
|
||||
}
|
||||
|
||||
void QtSelfRefreshIconButton::handleMessage(MessageRefresh* message)
|
||||
void QtSelfRefreshIconButton::handleMessage(MessageRefreshUI* message)
|
||||
{
|
||||
if (message->uiOnly)
|
||||
m_onQtThread([this]()
|
||||
{
|
||||
m_onQtThread([this]()
|
||||
{
|
||||
refresh();
|
||||
});
|
||||
}
|
||||
refresh();
|
||||
});
|
||||
}
|
||||
|
||||
void QtSelfRefreshIconButton::refresh()
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "FilePath.h"
|
||||
#include "MessageListener.h"
|
||||
#include "MessageRefresh.h"
|
||||
#include "MessageRefreshUI.h"
|
||||
|
||||
#include "QtThreadedFunctor.h"
|
||||
|
||||
@@ -53,7 +53,7 @@ private:
|
||||
|
||||
class QtSelfRefreshIconButton
|
||||
: public QPushButton
|
||||
, public MessageListener<MessageRefresh>
|
||||
, public MessageListener<MessageRefreshUI>
|
||||
{
|
||||
public:
|
||||
QtSelfRefreshIconButton(
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
void setIconPath(const FilePath& iconPath);
|
||||
|
||||
protected:
|
||||
void handleMessage(MessageRefresh* message);
|
||||
void handleMessage(MessageRefreshUI* message) override;
|
||||
|
||||
virtual void refresh();
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "MessageActivateTrail.h"
|
||||
#include "MessageDeactivateEdge.h"
|
||||
#include "MessageRefresh.h"
|
||||
#include "MessageRefreshUI.h"
|
||||
#include "MessageScrollGraph.h"
|
||||
#include "MessageStatus.h"
|
||||
#include "ResourcePaths.h"
|
||||
@@ -750,7 +750,7 @@ void QtGraphView::groupingUpdated(QPushButton* button)
|
||||
appSettings->save();
|
||||
}
|
||||
|
||||
MessageRefresh().refreshUiOnly().noReloadStyle().dispatch();
|
||||
MessageRefreshUI().noStyleReload().dispatch();
|
||||
}
|
||||
|
||||
void QtGraphView::performScroll(QScrollBar* scrollBar, int value) const
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "MessageInterruptTasks.h"
|
||||
#include "MessageLoadProject.h"
|
||||
#include "MessageRefresh.h"
|
||||
#include "MessageRefreshUI.h"
|
||||
#include "MessageResetZoom.h"
|
||||
#include "MessageWindowClosed.h"
|
||||
#include "MessageZoom.h"
|
||||
@@ -412,7 +413,7 @@ void QtMainWindow::keyPressEvent(QKeyEvent* event)
|
||||
case Qt::Key_R:
|
||||
if (event->modifiers() & (Qt::ControlModifier | Qt::AltModifier))
|
||||
{
|
||||
MessageRefresh().refreshUiOnly().dispatch();
|
||||
MessageRefreshUI().dispatch();
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "MessageLoadProject.h"
|
||||
#include "MessagePluginPortChange.h"
|
||||
#include "MessageRefresh.h"
|
||||
#include "MessageRefreshUI.h"
|
||||
#include "MessageScrollSpeedChange.h"
|
||||
|
||||
#include "Application.h"
|
||||
@@ -108,7 +108,7 @@ void QtPreferencesWindow::handleNext()
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageRefresh().refreshUiOnly().dispatch();
|
||||
MessageRefreshUI().dispatch();
|
||||
}
|
||||
|
||||
QtWindow::handleClose();
|
||||
|
||||
Reference in New Issue
Block a user