Created attachment 127508 [details] When there are more existing layers SUMMARY When editing a PSD file, even with a layer named "Layer 1" presents, the newly added layer is still named "Layer 1" instead of "Layer 2. STEPS TO REPRODUCE 1. Create a PSD file in Photoshop with a layer named "Layer 1" 2. Open said PSD file in Krita 3. Create a new layer OBSERVED RESULT The new layer is named "Layer 1" too. EXPECTED RESULT The new layer should be named "Layer 2". SOFTWARE/OS VERSIONS SUMMARY I still got random crashes on my Mac, even with canvas acceleration disabled. It happens about once a day. STEPS TO REPRODUCE Can't figure out the consistent reproducing steps. It seems pretty random. OBSERVED RESULT Crash EXPECTED RESULT Not crash SOFTWARE/OS VERSIONS macOS: 10.14.6 Krita: 4.9.2 ADDITIONAL INFORMATION See attachment
Hi Yu-Hsuan, Thank you for your report. I confirm this on 4.2.7.1. I also found out that if you created a kra file with a "Background Layer," when you re-open the file, the new layer you created will be "Layer (number of current layers + 1)." This holds even if the layer name is a duplicate. I guess the info about KisNameServer does not get saved into either file formats, but the two formats seem to use different methods to initialize the name server when opening the file. I think this is a bug.
(In reply to Yu-Hsuan Lai from comment #0) > SOFTWARE/OS VERSIONS > SUMMARY > I still got random crashes on my Mac, even with canvas acceleration > disabled. It happens about once a day. > > STEPS TO REPRODUCE > Can't figure out the consistent reproducing steps. It seems pretty random. > > > OBSERVED RESULT > Crash > > EXPECTED RESULT > Not crash > Also, for the crash thing, I suggest you making a separate bug report for it. It would be nice if you can also send a crash log. The way to generate one can be seen at https://docs.krita.org/en/reference_manual/sharing_krita_logs.html?highlight=crash#getting-backtrace .
(In reply to tusooa from comment #2) > (In reply to Yu-Hsuan Lai from comment #0) > > SOFTWARE/OS VERSIONS > > SUMMARY > > I still got random crashes on my Mac, even with canvas acceleration > > disabled. It happens about once a day. > > > > STEPS TO REPRODUCE > > Can't figure out the consistent reproducing steps. It seems pretty random. > > > > > > OBSERVED RESULT > > Crash > > > > EXPECTED RESULT > > Not crash > > > > Also, for the crash thing, I suggest you making a separate bug report for > it. It would be nice if you can also send a crash log. The way to generate > one can be seen at > https://docs.krita.org/en/reference_manual/sharing_krita_logs. > html?highlight=crash#getting-backtrace . Oh I made a separate report: https://bugs.kde.org/show_bug.cgi?id=420032 I just copied paste from it and forget to delete the extra characters. Sorry for the confusion.
Git commit 4a50d2f5931b5a414c9e48b23000e3d9212cf145 by Dmitry Kazakov. Committed on 30/07/2020 at 14:05. Pushed by dkazakov into branch 'krita/4.3'. Fix layer index generation algorithm Now the index is assigned to a layer dynamically. We just iterate over all the existing layers, find ones with index in the end of the name, choose the maximum one and create a new layer with index (maxIndex + 1). M +18 -14 libs/image/kis_image.cc M +0 -5 libs/image/kis_image.h M +0 -1 plugins/impex/libkra/kis_kra_loader.cpp https://invent.kde.org/graphics/krita/commit/4a50d2f5931b5a414c9e48b23000e3d9212cf145
Git commit b9df04d61453401db48152ca84c6936990c17552 by Dmitry Kazakov. Committed on 30/07/2020 at 14:08. Pushed by dkazakov into branch 'master'. Fix layer index generation algorithm Now the index is assigned to a layer dynamically. We just iterate over all the existing layers, find ones with index in the end of the name, choose the maximum one and create a new layer with index (maxIndex + 1). # Conflicts: # libs/image/kis_image.cc M +18 -14 libs/image/kis_image.cc M +0 -5 libs/image/kis_image.h M +0 -1 plugins/impex/libkra/kis_kra_loader.cpp https://invent.kde.org/graphics/krita/commit/b9df04d61453401db48152ca84c6936990c17552