logic: Show hidden indexing dialog on refresh
* Fixed refresh restarted when refreshing while processing files
This commit is contained in:
@@ -38,7 +38,7 @@ QtIndexingDialog::DialogType QtIndexingDialog::getType() const
|
||||
return m_type;
|
||||
}
|
||||
|
||||
void QtIndexingDialog::setupStart(const std::vector<RefreshMode>& enabledModes)
|
||||
void QtIndexingDialog::setupStart(const std::vector<RefreshMode>& enabledModes, const RefreshMode initialMode)
|
||||
{
|
||||
setType(DIALOG_START_INDEXING);
|
||||
|
||||
@@ -111,6 +111,10 @@ void QtIndexingDialog::setupStart(const std::vector<RefreshMode>& enabledModes)
|
||||
QRadioButton* button = p.second;
|
||||
button->setObjectName("option");
|
||||
button->setEnabled(false);
|
||||
if (p.first == initialMode)
|
||||
{
|
||||
button->setChecked(true);
|
||||
}
|
||||
modeLayout->addWidget(button);
|
||||
connect(button, &QRadioButton::toggled, func);
|
||||
}
|
||||
@@ -132,6 +136,8 @@ void QtIndexingDialog::setupStart(const std::vector<RefreshMode>& enabledModes)
|
||||
m_sizeHint = QSize(350, 310);
|
||||
|
||||
finishSetup();
|
||||
|
||||
emit setMode(initialMode);
|
||||
}
|
||||
|
||||
void QtIndexingDialog::updateRefreshInfo(const RefreshInfo& info)
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
|
||||
DialogType getType() const;
|
||||
|
||||
void setupStart(const std::vector<RefreshMode>& enabledModes);
|
||||
void setupStart(const std::vector<RefreshMode>& enabledModes, const RefreshMode initialMode);
|
||||
void updateRefreshInfo(const RefreshInfo& info);
|
||||
|
||||
void setupIndexing(bool hideable);
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "MessageDisplayBookmarks.h"
|
||||
#include "MessageEnteredLicense.h"
|
||||
#include "MessageFind.h"
|
||||
#include "MessageIndexingShowDialog.h"
|
||||
#include "MessageInterruptTasks.h"
|
||||
#include "MessageLoadProject.h"
|
||||
#include "MessageRefresh.h"
|
||||
@@ -660,11 +661,13 @@ void QtMainWindow::closeWindow()
|
||||
|
||||
void QtMainWindow::refresh()
|
||||
{
|
||||
MessageIndexingShowDialog().dispatch();
|
||||
MessageRefresh().dispatch();
|
||||
}
|
||||
|
||||
void QtMainWindow::forceRefresh()
|
||||
{
|
||||
MessageIndexingShowDialog().dispatch();
|
||||
MessageRefresh().refreshAll().dispatch();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user