Skip to content

Commit

Permalink
Added mdi history entry swap function
Browse files Browse the repository at this point in the history
Supports MDH history widget moving row entries up and down.
  • Loading branch information
joco-nz committed Jun 18, 2020
1 parent a495943 commit 30d66f5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions qtpyvcp/plugins/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down

0 comments on commit 30d66f5

Please sign in to comment.