Skip to content

Commit

Permalink
Fixing quick entry issue when inserting root nodes.
Browse files Browse the repository at this point in the history
* Fixing potential issue with creating a new tab.
  • Loading branch information
phase1geo committed May 30, 2024
1 parent 6b0b88e commit 0bc7495
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 4 additions & 1 deletion src/DrawArea.vala
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,10 @@ public class DrawArea : Gtk.DrawingArea {

/* Make this initial node the current node */
set_current_node( n );
set_node_mode( n, NodeMode.EDITABLE, false );
Idle.add(() => {
set_node_mode( n, NodeMode.EDITABLE, false );
return( false );
});

/* Redraw the canvas */
queue_draw();
Expand Down
10 changes: 4 additions & 6 deletions src/exports/ExportText.vala
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,10 @@ public class ExportText : Export {
}

var current = da.get_current_node();
if( current != null ) {
if( replace ) {
da.replace_node( current, stack.index( 0 ).node );
} else {
parent_node( da, stack.index( 0 ).node, current );
}
if( (current != null) && replace ) {
da.replace_node( current, stack.index( 0 ).node );
} else {
parent_node( da, stack.index( 0 ).node, current );
}

if( nodes != null ) {
Expand Down

0 comments on commit 0bc7495

Please sign in to comment.