mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
kcontrol: do not update the time while text is selected in clock KCM
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
8a124d6491
commit
569b6d8ebb
1 changed files with 8 additions and 3 deletions
|
@ -289,9 +289,14 @@ void KCMClock::slotUpdate()
|
|||
{
|
||||
const QDateTime now = QDateTime::currentDateTime();
|
||||
if (!m_timechanged) {
|
||||
m_timeedit->blockSignals(true);
|
||||
m_timeedit->setTime(now.time());
|
||||
m_timeedit->blockSignals(false);
|
||||
// do not update while text has been selected otherwise selection changes, the value will
|
||||
// be updated once selection is cleared
|
||||
QLineEdit* timeeditlineedit = m_timeedit->findChild<QLineEdit*>();
|
||||
if (!timeeditlineedit || !timeeditlineedit->hasSelectedText()) {
|
||||
m_timeedit->blockSignals(true);
|
||||
m_timeedit->setTime(now.time());
|
||||
m_timeedit->blockSignals(false);
|
||||
}
|
||||
}
|
||||
if (!m_datechanged) {
|
||||
m_dateedit->blockSignals(true);
|
||||
|
|
Loading…
Add table
Reference in a new issue