hgcacheproxymodel/src/hgcacheproxymodel.cpp
changeset 8 15f034b8a3b5
parent 3 c863538fcbb6
child 17 a10844a9914d
equal deleted inserted replaced
5:4fa04caf0f43 8:15f034b8a3b5
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:
    14 * Description:
    15 *
    15 *
    16 *  Version     : %version: 10 %
    16 *  Version     : %version: 11 %
    17 */
    17 */
    18 #include <QList>
    18 #include <QList>
    19 #include <QAbstractItemModel>
    19 #include <QAbstractItemModel>
    20 
    20 
    21 #include <hgwidgets/hgcacheproxymodel.h>
    21 #include <hgwidgets/hgcacheproxymodel.h>
   580 
   580 
   581 void HgCacheProxyModel::sourceLayoutAboutToBeChanged()
   581 void HgCacheProxyModel::sourceLayoutAboutToBeChanged()
   582 {
   582 {
   583     TX_ENTRY
   583     TX_ENTRY
   584     emit layoutAboutToBeChanged();
   584     emit layoutAboutToBeChanged();
   585     mSupressBM = true;
       
   586     releaseAll();
       
   587     TX_EXIT
   585     TX_EXIT
   588 }
   586 }
   589 
   587 
   590 void HgCacheProxyModel::sourceLayoutChanged()
   588 void HgCacheProxyModel::sourceLayoutChanged()
   591 {
   589 {
   592     TX_ENTRY
   590     TX_ENTRY
   593     mSupressBM = true;
       
   594     if (mBufferManager){
       
   595         mCurrentPos = 0;
       
   596         mBufferManager->resetBuffer( mCurrentPos, count() );
       
   597     }
       
   598     mSupressBM = false;
       
   599     emit layoutChanged();
   591     emit layoutChanged();
   600     TX_EXIT    
   592     TX_EXIT    
   601 }
   593 }
   602 
   594 
   603 void HgCacheProxyModel::sourceModelAboutToBeReset()
   595 void HgCacheProxyModel::sourceModelAboutToBeReset()