Skip to content

Commit 454c1c0

Browse files
author
Gin
committed
fix string widget visibility changes
1 parent 874590e commit 454c1c0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Common/Cpp/Options/ConfigOption.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ class ConfigOption{
9393
}
9494

9595
public:
96+
// Return the lock mode: how locking works on this option. It can be:
97+
// - UNLOCK_WHILE_RUNNING,
98+
// - LOCK_WHILE_RUNNING,
99+
// - READ_ONLY,
96100
LockMode lock_mode() const;
97101

98102
// Returns error message if invalid. Otherwise returns empty string.

Common/Qt/Options/StringWidget.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ void StringCellWidget::on_config_value_changed(void* object){
6060
}
6161
void StringCellWidget::on_config_visibility_changed(){
6262
QMetaObject::invokeMethod(this, [this]{
63+
update_visibility();
6364
setReadOnly(m_value.lock_mode() == LockMode::READ_ONLY || m_value.is_locked());
6465
}, Qt::QueuedConnection);
6566
}
@@ -109,6 +110,7 @@ void StringOptionWidget::on_config_value_changed(void* object){
109110
}
110111
void StringOptionWidget::on_config_visibility_changed(){
111112
QMetaObject::invokeMethod(m_box, [this]{
113+
update_visibility();
112114
m_box->setReadOnly(m_value.is_locked());
113115
}, Qt::QueuedConnection);
114116
}

0 commit comments

Comments
 (0)