Qt: Fix scan percent dropping back to 0% at end
This commit is contained in:
parent
6176a21ff1
commit
a6cf320776
|
@ -22,6 +22,23 @@ void AsyncRefreshProgressCallback::Cancel()
|
|||
m_cancelled = true;
|
||||
}
|
||||
|
||||
void AsyncRefreshProgressCallback::PushState()
|
||||
{
|
||||
ProgressCallback::PushState();
|
||||
}
|
||||
|
||||
void AsyncRefreshProgressCallback::PopState()
|
||||
{
|
||||
ProgressCallback::PopState();
|
||||
|
||||
if (static_cast<int>(m_progress_range) == m_last_range && static_cast<int>(m_progress_value) == m_last_value)
|
||||
return;
|
||||
|
||||
m_last_range = static_cast<int>(m_progress_range);
|
||||
m_last_value = static_cast<int>(m_progress_value);
|
||||
fireUpdate();
|
||||
}
|
||||
|
||||
void AsyncRefreshProgressCallback::SetStatusText(const std::string_view text)
|
||||
{
|
||||
const QString new_text = QtUtils::StringViewToQString(text);
|
||||
|
|
|
@ -18,6 +18,9 @@ public:
|
|||
|
||||
void Cancel();
|
||||
|
||||
void PushState() override;
|
||||
void PopState() override;
|
||||
|
||||
void SetStatusText(const std::string_view text) override;
|
||||
void SetProgressRange(u32 range) override;
|
||||
void SetProgressValue(u32 value) override;
|
||||
|
|
Loading…
Reference in New Issue