#6344 Restore default clipboard sharing size

When clipboard sharing is re-enabled, and the current size limit is 0,
make sure that the default size limit is restored
This commit is contained in:
Andrew Nelless 2017-01-30 14:57:53 +00:00 committed by Nick Bolton
parent 8054bc51a5
commit 88bf4b2e47
1 changed files with 4 additions and 0 deletions

View File

@ -221,6 +221,10 @@ void ServerConfigDialog::on_m_pButtonRemoveAction_clicked()
void ServerConfigDialog::on_m_pCheckBoxEnableClipboard_stateChanged(int const state) void ServerConfigDialog::on_m_pCheckBoxEnableClipboard_stateChanged(int const state)
{ {
m_pSpinBoxClipboardSizeLimit->setEnabled (state == Qt::Checked); m_pSpinBoxClipboardSizeLimit->setEnabled (state == Qt::Checked);
if ((state == Qt::Checked) && (!m_pSpinBoxClipboardSizeLimit->value())) {
int size = (serverConfig().defaultClipboardSharingSize() + 512) / 1024;
m_pSpinBoxClipboardSizeLimit->setValue (size ? size : 1);
}
} }
void ServerConfigDialog::on_m_pListActions_itemSelectionChanged() void ServerConfigDialog::on_m_pListActions_itemSelectionChanged()