瀏覽代碼

High CPU load when idle in local-local mode

Caused by c2c2596d (Queue panel is always hidden in the local-local mode)

Source commit: dc1427068dfe91f025ef9f005254e4661ad50489
Martin Prikryl 4 年之前
父節點
當前提交
3ea7f33f16
共有 1 個文件被更改,包括 3 次插入6 次删除
  1. 3 6
      source/forms/NonVisual.cpp

+ 3 - 6
source/forms/NonVisual.cpp

@@ -487,12 +487,9 @@ void __fastcall TNonVisualDataModule::ExplorerActionsUpdate(
   UPDEX(QueueItemSpeedAction, ScpExplorer->AllowQueueOperation(qoItemSpeed, &AuxVoidPtr),
     QueueItemSpeedAction->Text = SetSpeedLimit(reinterpret_cast<unsigned long>(AuxVoidPtr)),
     QueueItemSpeedAction->Text = L"")
-  UPDACT(QueueToggleShowAction,
-    Action->Checked = ScpExplorer->ComponentVisible[fcQueueView];
-    Action->Enabled = !ScpExplorer->IsLocalBrowserMode())
-  #define QUEUEACTION(SHOW) UPDACT(Queue ## SHOW ## Action, \
-    Action->Checked = WinConfiguration->QueueView.Show == qv ## SHOW; \
-    Action->Enabled = !ScpExplorer->IsLocalBrowserMode())
+  UPDEX1(QueueToggleShowAction, !ScpExplorer->IsLocalBrowserMode(), Action->Checked = ScpExplorer->ComponentVisible[fcQueueView])
+  #define QUEUEACTION(SHOW) \
+    UPDEX1(Queue ## SHOW ## Action, !ScpExplorer->IsLocalBrowserMode(), Action->Checked = WinConfiguration->QueueView.Show == qv ## SHOW)
   QUEUEACTION(Show)
   QUEUEACTION(HideWhenEmpty)
   QUEUEACTION(Hide)