Hi, Here is a bug about renaming layer (not a new behavior). To reproduce: ============= 1. Create a new document 2. Create three or four new layers (eg. Layer 1, Layer 2, Layer 3) 3. Double click the name of the layer to edit it (can be with mouse or stylus) Result: ======= Sometime a double-click highlights the full layer name (perfect). But sometime the highlight disappear and cursor jumps at the end of the name. Sometime the double-click select only the last word (eg. "2" in "Layer 2"). Sometime, the highlight select all the name, but as soon as I type, the cursor jumps to the last position. This issue results in having often mis named layers or having to edit more than one or two time until I can set a correct name.
Created attachment 115919 [details] (Video) (Krita appimage 4.2.0-pre-alpha (git 55c0c6d) - Ubuntu 14.04, Unity) Hi, here I can reproduce the issue with these steps (see video): 1. click on any layer once 2. double click the actual layer you need to rename. Actual Results: text highlighting disappears after a second
Confirming.
The exact steps are: 1. click on "layer A", once 2. double click on "layer B" (it works) 3. click on "layer A" once 4. double click on "layer B"
confirmed here too.
I don't really this happening, but maybe that's because I'm using an external mouse, or a different xcb implementation, or something else. I'm not sure what we can do about it. If there's a fix, it probably will be in KisNodeDelegate::editorEvent
Git commit dd0a38e89d8996b524d517710c3f903e4d240d18 by Boudewijn Rempt. Committed on 30/10/2018 at 13:26. Pushed by rempt into branch 'master'. Give the delegate StrongFocus, as per Qt documentation See http://doc.qt.io/qt-5/qabstractitemdelegate.html#createEditor M +2 -1 libs/ui/KisNodeDelegate.cpp https://commits.kde.org/krita/dd0a38e89d8996b524d517710c3f903e4d240d18
I still get this issue here on git 9697760 :|
Git commit 078429964d4fbb897b42374959e22961403bb42d by Boudewijn Rempt. Committed on 20/11/2018 at 08:25. Pushed by rempt into branch 'krita/4.1'. Give the delegate StrongFocus, as per Qt documentation See http://doc.qt.io/qt-5/qabstractitemdelegate.html#createEditor M +2 -1 libs/ui/KisNodeDelegate.cpp https://commits.kde.org/krita/078429964d4fbb897b42374959e22961403bb42d
Created attachment 118713 [details] Video example 2 (timing) (Checked with Krita 4.2.0-pre-alpha (git c2fbec1) Hi, could be a timing issue (see video)? If I do click the layer and quickly hit F2, then the text will lose its selection/highlighting. Where if I click the layer, wait a few seconds and hit F2, then the text will remain highlighted/selected.
*** Bug 405334 has been marked as a duplicate of this bug. ***
*** Bug 405310 has been marked as a duplicate of this bug. ***
Created attachment 120311 [details] Disable updating layer name upon thumbnail update I had some debug session today and found the reason of the bug. It comes from the timer which updates the thumbnail which drops to "LayerBox::updateThumbnail()" -> "NodeView::updateNode()" -> "NodeView::dataChanged(...)" -> "NodeDelegate::setEditorData(...)". There is no reason to update layer name in edit box every time when that signal is emitted, actually, it's sufficient enough to update it for the first time only when the layer name is to be put to the editbox, because of the second and further signals are came from "updateThumbnail". I didn't find an other simple way to fix it, but this patch works reliable enough and do not revert layer name any more. Please consider this patch, it fixes the bug, but I'm not sure if it is the correct way to go.
Hey Dmitry, Would you like to try applying that patch to a fork of yours on the KDE gitlab instance(and then make a merge request)? https://invent.kde.org/kde/krita If you don't, that's okay, it'll just make code review a little easier for us :)
Dear @wolthera, I'd like to create a fork and Merge Request, but could you please help me with login to gitlab? Looks like it should use the same account as here, but I cannot login with it: "Invalid credentials". I tried with "KDE identity" and "Standard" options.
Hey Dmitry, did you make a KDE Identity account? At identity.kde.org? (It's a seperate login than the bugtracker, but on the plus side, basically every other KDE infra(forums, wikis, gitlab) except the bugtracker can use it)
Thanks for help, I managed to create the account. Here is the MR: https://invent.kde.org/kde/krita/merge_requests/33
Fixed in commit 98d97d0e7f900ad8be59faa0dc33e84648feda53 Author: Dmitrii Utkin <dmitriiutkin@kde.org> Date: Mon May 27 18:11:20 2019 +0000 400357 don't update editor's text by setEditorData
Thank you @Dmitry Utkin for fixing this bug and to @Boud too for shipping it with Krita 4.2.1 today. Super!