SUMMARY The first file I open in Krita, whatever the format (jpg, png, kra) generate the following message in terminal: ``` QAbstractItemModel::endInsertColumns: Invalid index ( 0 , 101 ) in model KisAnimTimelineFramesModel(0x5607b0855610) ``` STEPS TO REPRODUCE 1. Start Krita from terminal 2. Open a file OBSERVED RESULT - An invalid index message related to KisAnimTimelineFramesModel is displayed - Next files opened don't generate message Note: if Animation Timeline docker is visible, there's no error message EXPECTED RESULT - No error message? SOFTWARE/OS VERSIONS Krita Version: 5.2.0-beta2 Hidpi: false Qt Version (compiled): 5.15.7 Version (loaded): 5.15.7 OS Information Build ABI: x86_64-little_endian-lp64 Build CPU: x86_64 CPU: x86_64 Kernel Type: linux Kernel Version: 5.19.0-45-generic Pretty Productname: KDE neon 5.27 Product Type: neon Product Version: 22.04 Desktop: KDE Appimage build: Yes
Opening an animation file with 75 frames (0 to 74) generate a different message :) ``` QAbstractItemModel::endInsertColumns: Invalid index ( 1 , 75 ) in model KisAnimTimelineFramesModel(0x55f8e4ef8380) ```
Yep, you're right. I'm not sure why this is happening yet, but it'll be on my list of things to look into next week. Thanks for the report as always grum!
*** Bug 473282 has been marked as a duplicate of this bug. ***
Ah thanks! Didn't saw the bug 473282 as I didn't searched in resolved... :-/
Git commit 2157e5c8a4d36c13f7b69be739f136639faeb2ca by Dmitry Kazakov. Committed on 23/08/2023 at 11:24. Pushed by dkazakov into branch 'master'. Fix a model warning in KisTimeBasedItemModel There were two issues: 1) KisTimeBasedItemModel::columnCount() could return the value that has already changed in the image without calling to begin/endInsertColumns. That is not really welcome by Qt. 2) In KisTimeBasedItemModel::setImage() we reset the model (and therefore updated its columns list), but didn't update m_d->numFramesOverride, which caused double insertion of the columns in slotPlaybackRangeChanged() a bit later. M +2 -1 plugins/dockers/animation/KisTimeBasedItemModel.cpp https://invent.kde.org/graphics/krita/-/commit/2157e5c8a4d36c13f7b69be739f136639faeb2ca
Git commit de673feee8f20079e54b51f7799d48e267703035 by Dmitry Kazakov. Committed on 23/08/2023 at 11:26. Pushed by dkazakov into branch 'krita/5.2'. Fix a model warning in KisTimeBasedItemModel There were two issues: 1) KisTimeBasedItemModel::columnCount() could return the value that has already changed in the image without calling to begin/endInsertColumns. That is not really welcome by Qt. 2) In KisTimeBasedItemModel::setImage() we reset the model (and therefore updated its columns list), but didn't update m_d->numFramesOverride, which caused double insertion of the columns in slotPlaybackRangeChanged() a bit later. M +2 -1 plugins/dockers/animation/KisTimeBasedItemModel.cpp https://invent.kde.org/graphics/krita/-/commit/de673feee8f20079e54b51f7799d48e267703035