Summary: | Logic error in image resize dialog | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Dik Takken <kde> |
Component: | Plugin-Editor-Resize | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 0.7.2 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 7.6.0 |
Description
Dik Takken
2005-04-04 23:41:57 UTC
CVS commit by pahlibar: if user has changed values and pressed ok without allowing the focus to return to the resizedialog, then the changed signal is not fired. so check for this change before exiting. BUGS: 103243 M +16 -2 imageresizedlg.cpp 1.11 M +5 -0 imageresizedlg.h 1.7 --- kdeextragear-3/digikam/utilities/imageeditor/imageresizedlg.cpp #1.10:1.11 @@ -44,4 +44,9 @@ ImageResizeDlg::ImageResizeDlg(QWidget * m_height = height; + m_prevW = *m_width; + m_prevH = *m_height; + m_prevWP = 100.0; + m_prevHP = 100.0; + QGridLayout *topLayout = new QGridLayout( plainPage(), 0, 3, 4, spacingHint()); @@ -96,6 +101,10 @@ ImageResizeDlg::~ImageResizeDlg() void ImageResizeDlg::slotOk() { - *m_width = m_wInput->value(); - *m_height = m_hInput->value(); + if (m_prevW != m_wInput->value() || m_prevH != m_hInput->value() || + m_prevWP != m_wpInput->value() || m_prevHP != m_hpInput->value()) + slotChanged(); + + *m_width = m_prevW; + *m_height = m_prevH; accept(); } @@ -163,4 +172,9 @@ void ImageResizeDlg::slotChanged() } + m_prevW = m_wInput->value(); + m_prevH = m_hInput->value(); + m_prevWP = m_wpInput->value(); + m_prevHP = m_hpInput->value(); + m_wInput->blockSignals(false); m_hInput->blockSignals(false); --- kdeextragear-3/digikam/utilities/imageeditor/imageresizedlg.h #1.6:1.7 @@ -51,4 +51,9 @@ private: int *m_height; + int m_prevW; + int m_prevH; + double m_prevWP; + double m_prevHP; + private slots: |