New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added ability for escape key to close editing box in Value column in the Parameters panel #2455
Conversation
@nickleus27 |
@ice0 Thank you. Sounds good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was a nice trick to simply prevent to call activate
.
But somehow I think it should set property_editing_canceled
to true before finish editing.
As I'm not sure about it, let it be :)
@rodolforg Yes, I think you are right. |
Where? |
@rodolforg I am having some trouble getting |
It's a CellRenderer signal. So, CellRenderer_ValueBase should implement it. |
@rodolforg this is the error i am getting: Not sure what I am doing wrong? edit value_entry is a subclass of gtk::celleditable |
@ice0 @rodolforg Hey fellows, can you check these changes out when you have a chance. There is a problem with these changes for sure. When you escape a value entry more than once it produces this output error:
|
Maybe we should leave as you did before XD |
@rodolforg No problem, I reverted back to previous solution. I enjoyed learning about |
Hi, guys! First. Cell in It is not editable and is only used to display the cell value. But when you click on it, it emits a Next we creating editable cell synfig/synfig-studio/src/gui/cellrenderer/cellrenderer_value.cpp Lines 655 to 659 in ec35bd8
This class is the place where we can catch keypresses and other events and should signal to the parent cell when editing is done or canceled. If editing is canceled then we should set I think the current implementation works as expected only because it just hides the widget without emitting signals. To make it work correctly you need to set |
Thank you @ice0 ! I will work on this. :) |
@ice0 Am I understanding this correctly? I should keep |
@nickleus27 |
Yes.
But Esc key handler doesn't emit signal, it's just calls
To emit |
@ice0 alright I think this is it. Thank you for being so patient. I had made this assumption that on_editing_done() should be emitting the signal_editing_done(), but that assumption was wrong. You had mentioned this a while ago, but I was reluctant to make sense of it. |
You are welcome! |
@ice0 Yes, good idea! I like the idea of returning from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case of @ice0 doesn't think my comment is relevant, I let here my approval :)
Very nice and clean :) |
Merged. Thank you! |
@ice0 thank you |
#2411
I added changes in
cellrenderer_value.cpp
. I added theon_key_press_event
method to check for escape key and callon_editing_done()
. I also had to add thesignal_key_press_event()
for the value widget.@ice0 @rodolforg Hey guys can you check out these changes? Thanks again for all the advice to get me started.