projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prevent Ok being pressed when no device is selected
[pulseview.git]
/
pv
/
dialogs
/
connect.cpp
diff --git
a/pv/dialogs/connect.cpp
b/pv/dialogs/connect.cpp
index 87fc451acee3819e2b9622cbe849f9d8faec8e79..51de735e00e1d5e24eb1ad6d5e0dab13ee877f15 100644
(file)
--- a/
pv/dialogs/connect.cpp
+++ b/
pv/dialogs/connect.cpp
@@
-112,6
+112,7
@@
void Connect::unset_connection()
_device_list.clear();
_serial_device.hide();
_form_layout.labelForField(&_serial_device)->hide();
_device_list.clear();
_serial_device.hide();
_form_layout.labelForField(&_serial_device)->hide();
+ _button_box.button(QDialogButtonBox::Ok)->setDisabled(true);
}
void Connect::set_serial_connection()
}
void Connect::set_serial_connection()
@@
-167,6
+168,9
@@
void Connect::scan_pressed()
g_slist_free(devices);
g_slist_free_full(drvopts, (GDestroyNotify)free_drvopts);
g_slist_free(devices);
g_slist_free_full(drvopts, (GDestroyNotify)free_drvopts);
+
+ _device_list.setCurrentRow(0);
+ _button_box.button(QDialogButtonBox::Ok)->setDisabled(false);
}
void Connect::device_selected(int index)
}
void Connect::device_selected(int index)