Fix error handling from modbus_read_one

This is for ticket #33

Essentially this cherry picks the changes to CMainFrame::RefreshTreeView
from a098d476b978f03e8e3d1b263163eb2bf2487447 that were partially
over-written and restores them