[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/office/kmymoney/kmymoney
From: Cristian OneČ› <onet.cristian () gmail ! com>
Date: 2010-10-04 17:38:57
Message-ID: 20101004173857.36811AC88C () svn ! kde ! org
[Download RAW message or body]
SVN commit 1182473 by conet:
Improve the aspect of the transaction editor form while data change is emitted (the \
flickering is not that bad as it used to be).
M +1 -1 dialogs/transactioneditor.cpp
M +2 -14 widgets/transactionform.cpp
M +1 -4 widgets/transactionform.h
--- trunk/extragear/office/kmymoney/kmymoney/dialogs/transactioneditor.cpp \
#1182472:1182473 @@ -688,7 +688,7 @@
// force resizeing of the columns in the form
KMyMoneyTransactionForm::TransactionForm* form = \
dynamic_cast<KMyMoneyTransactionForm::TransactionForm*>(m_regForm); if (form) {
- QTimer::singleShot(0, form, SLOT(resize()));
+ QMetaObject::invokeMethod(form, "resize", Qt::QueuedConnection, \
QGenericReturnArgument(), Q_ARG(int, ValueColumn1)); }
}
--- trunk/extragear/office/kmymoney/kmymoney/widgets/transactionform.cpp \
#1182472:1182473 @@ -231,8 +231,6 @@
{
m_transaction = transaction;
- bool updatesNeedToBeDisabled = updatesEnabled();
- if (updatesNeedToBeDisabled)
setUpdatesEnabled(false);
if (m_transaction) {
@@ -264,7 +262,6 @@
setMaximumHeight(height);
setMinimumHeight(height);
- if (updatesNeedToBeDisabled)
setUpdatesEnabled(true); // see the call to setUpdatesEnabled(false) above
for (int i = 0; i < rowCount(); ++i) {
@@ -272,7 +269,7 @@
}
// force resizeing of the columns
- QTimer::singleShot(0, this, SLOT(resize()));
+ QMetaObject::invokeMethod(this, "resize", Qt::QueuedConnection, \
QGenericReturnArgument(), Q_ARG(int, ValueColumn1)); }
void TransactionForm::paintCell(QPainter* painter, const QStyleOptionViewItem& \
option, const QModelIndex& index) @@ -352,15 +349,8 @@
m_tabBar->blockSignals(blocked);
}
-void TransactionForm::resize(void)
-{
- resize(ValueColumn1);
-}
-
void TransactionForm::resize(int col)
{
- bool updatesNeedToBeDisabled = updatesEnabled();
- if (updatesNeedToBeDisabled)
setUpdatesEnabled(false);
// resize the register
@@ -386,9 +376,7 @@
if (col < nc && w >= 0)
setColumnWidth(col, w);
- if (updatesNeedToBeDisabled)
- setUpdatesEnabled(true); // see the call to setUpdatesEnabled(false) above
- update();
+ setUpdatesEnabled(true);
}
void TransactionForm::adjustColumn(Column col)
--- trunk/extragear/office/kmymoney/kmymoney/widgets/transactionform.h \
#1182472:1182473 @@ -156,8 +156,6 @@
void paintCell(QPainter *painter, const QStyleOptionViewItem &option, const \
QModelIndex &index);
- void resize(int col);
-
void arrangeEditWidgets(QMap<QString, QWidget*>& editWidgets, \
KMyMoneyRegister::Transaction* t); void removeEditWidgets(QMap<QString, QWidget*>& \
editWidgets); void tabOrder(QWidgetList& tabOrderWidgets, \
KMyMoneyRegister::Transaction* t) const; @@ -217,10 +215,9 @@
public slots:
void slotSetTransaction(KMyMoneyRegister::Transaction* item);
+ void resize(int col);
protected slots:
- void resize(void);
-
/**
* Helper method to convert @a int into @a KMyMoneyRegister::Action
*/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic