Index: sources/gui/qml/pages/settings/SettingsExportLogs.qml =================================================================== diff -u -r8b044d8ef7db6f72c65aa6109d5f29a79bca92a2 -r142f2ddb8ce284c52c0add2acf3ac81f471b78de --- sources/gui/qml/pages/settings/SettingsExportLogs.qml (.../SettingsExportLogs.qml) (revision 8b044d8ef7db6f72c65aa6109d5f29a79bca92a2) +++ sources/gui/qml/pages/settings/SettingsExportLogs.qml (.../SettingsExportLogs.qml) (revision 142f2ddb8ce284c52c0add2acf3ac81f471b78de) @@ -138,6 +138,16 @@ onSdIsReadyChanged: { _root.updatePanels() } + onDidExportStat: { + //DEBUG: console.debug(" 4 ", vIndex, vFileName, vPercent) + } + onExportIndexChanged: { + //DEBUG: console.debug(" # " , _GuiView.exportIndex, _GuiView.exportList, _GuiView.exportList[ _GuiView.exportIndex ], _GuiView.doExportListSelect( _GuiView.exportIndex )) + } + + onExportListChanged: { + //DEBUG: console.debug(" @ " , _GuiView.exportIndex, _GuiView.exportList, _GuiView.exportList[ _GuiView.exportIndex ], _GuiView.doExportListSelect( _GuiView.exportIndex )) + } } USBButton { id: _usbEjectButton @@ -347,13 +357,20 @@ Component { id : _sdcFileDelegate ProgressBar { id : _sdcItemBackground - property bool selected : false + property bool inExportList : _GuiView.exportList [ index ] // I couldn't make it work and this always returns undefined, but has to be used to trigger the change. + ? _GuiView.exportList [ index ] // In case the issue fixes it should return true if it is true, obviously! + : _GuiView.doExportListSelect ( index ) // otherwise for now, it calls the contains() function of the list in C++ backend. + property int exportPercent : _GuiView.exportListPercent [ index ] + ? _GuiView.exportListPercent [ index ] + : _GuiView.doExportListPercent( index ) + //DEBUG: onInExportListChanged: console.debug(" * ", index, inExportList) function exportListUpdate() { - selected = ! selected - if ( selected ) - _GuiView.doExportListInsert( index , fileName ) - else + if (_GuiView.doExportListSelect( index ) ) { _GuiView.doExportListDelete( index ) + } + else { + _GuiView.doExportListInsert( index , fileName ) + } } MouseArea { @@ -364,8 +381,8 @@ minText.visible : false maxText.visible : false marker.visible : false - maximum : fileSize - value : fileSize + maximum : 100 // percent + value : maximum // - exportPercent width : parent.width height : 40 bgColor : Colors.transparent @@ -374,9 +391,7 @@ // and the next time it getsin the view port to be created, selected is false as its default // therfore we need to update the current with selected property while the item is alive, // on recreation the list will help update the item. - color : selected || // to update the current item/index in the view port on the item click - _GuiView.doExportListSelect(index) ? // to update the selected item/index later when gets back in the view port - Colors.borderButtonSelected : Colors.transparent + color : /*Colors.borderButtonSelected //*/ inExportList ? Colors.borderButtonSelected : Colors.transparent radius : 5 Row { id : _sdcFileRow width : parent.width