From 30d66f57571dcdbf28812d332cbcf31e50441080 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 18 Jun 2020 23:09:38 +1200 Subject: [PATCH] Added mdi history entry swap function Supports MDH history widget moving row entries up and down. --- qtpyvcp/plugins/status.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qtpyvcp/plugins/status.py b/qtpyvcp/plugins/status.py index 542bd8508..80ff9d40e 100644 --- a/qtpyvcp/plugins/status.py +++ b/qtpyvcp/plugins/status.py @@ -184,6 +184,13 @@ def mdi_remove_entry(self, mdi_index): del cmds[mdi_index] chan.signal.emit(cmds) + def mdi_swap_entries(self, index1, index2): + """Swicth two entries about.""" + chan = self.mdi_history + cmds = chan.value + cmds[index2], cmds[index1] = cmds[index1], cmds[index2] + chan.signal.emit(cmds) + @DataChannel def on(self, chan): """True if machine power is ON."""