Ride-Details - 'Extra' Tab - Text Field 'Read Only' only

... be less restrictive for 'TextEdit' and 'LineEdit' field, jus set
'Read Only' to still allow mainly scrolling (which is otherwise blocked)

... mainly for 'Change Log'  and 'Calendar Text'
This commit is contained in:
Joern
2014-07-28 20:11:09 +02:00
parent c7ec57ba6c
commit c7c8e77197

View File

@@ -178,8 +178,18 @@ RideMetadata::setExtraTab()
// since we show EVERYTHING, don't let the user edit them
// we might get more selective later?
field->widget->setEnabled(false);
// set Text Field to 'Read Only' to still enable scrolling,...
QTextEdit* textEdit = dynamic_cast<QTextEdit*> (field->widget);
if (textEdit) textEdit->setReadOnly(true);
else {
QLineEdit* lineEdit = dynamic_cast<QLineEdit*> (field->widget);
if (lineEdit) lineEdit->setReadOnly(true);
else field->widget->setEnabled(false);
}
}
}
}