Escape key does not work
Brought to you by:
insilmaril
By pressing [ENTER] at a node you get into edit-mode. By pressing [ESC] you should be in traversal-mode and the changes should be undone.
By pressing [INSERT] a new node appears and you get into edit-mode. By pressing [ESC] the node should be undone and you should be in traversal-mode.
Hm, just clearing the LineEdit might leave an empty branch, that depends on settings.
Not trivial due amount of required UNDOs
If you connect Escape-Key and LineEdit probably this function can be called:
void Main::editHeadingEscaped()
{
if (lineedit->isVisible())
{
bool ok;
QPoint p; //Not used here, only to find out pos of branch
QString s = currentMapEditor()->getHeading(ok,p);
if (ok)
{
lineedit->setText(s);
editHeadingFinished();
} // nothing will happen when escape-key was pressed and error occured getting last heading.
}
}
Any work in progress on that?
works meanwhile. (at least for me ;-) )