Preserve source widget on click.

Remove TreeTableNodeText from parent, store it in TreeTableNodeLineEdit
and moves it back when the latter loses focus.
This commit is contained in:
SET
2020-11-22 18:58:04 +01:00
parent 14964f9862
commit bbc62a6efa
2 changed files with 15 additions and 6 deletions

View File

@@ -58,13 +58,19 @@ public:
WTreeTableNode * node, uint colIndex);
virtual ~TreeTableNodeLineEdit();
/**
* Creates back a TreeTableNodeText replacing this TreeTableNodeLineEdit.
* Move back the original TreeTableNodeText replacing this
* TreeTableNodeLineEdit.
*/
void OnBlurred();
/**
* Keep the original TreeTableNodeText verbatim.
* @param text
*/
void HoldSourceWidget(std::unique_ptr<WWidget> sourceWidget);
private:
WTreeTableNode * m_node;
uint m_colIndex;
TreeTableNodeText * m_text;
std::unique_ptr<WWidget> m_sourceWidget;
void Init(WTreeTableNode * node, uint colIndex);
};