Commits

Herbert Breunung  committed ddf78ff

cleanup debugging session

  • Participants
  • Parent commits 5d84aaa

Comments (0)

Files changed (2)

File lib/Kephra/App/Bar/Document.pm

 	$position = $self->leftmost_page_pos     if $position eq 'leftmost';
 	$set_active = 1                          unless defined $set_active;
 
-#print "L:$label, P:$position \n";
-
 	unless ($new_panel->isa('Wx::Panel')) { # put panel under a none-panel
-#print "repanel \n";
 		$new_panel = Kephra::App::Panel->new( $self, $new_panel);
 	}
 	else { $new_panel->Reparent( $self ) }
-
-#return if $position and not $label;
-
-	# document property panel ref has to be set before EVT_AUINOTEBOOK_PAGE_CHANGED 
+	# document property: panel the editor sits on has to be set before EVT_AUINOTEBOOK_PAGE_CHANGED 
 	$panel_candidate->panel( $new_panel ) if $panel_candidate->isa('Kephra::Document');
 
 	$self->InsertPage( $position, $new_panel, $label, $set_active );
 	$self->set_page_title( $position, $label);
 	Wx::Window::SetFocus( $new_panel ) if $set_active;
 
+#print "Panel: $new_panel $panel_candidate",$panel_candidate->editor->GetParent->GetParent,"\n";
+
 	# inserting new index to position translators
 	for   (@{$self->{'visual_page_order'}}){ $_++ if $_ >= $position }
 	splice @{$self->{'visual_page_order'}},  $position, 0, $position;

File lib/Kephra/App/Panel/Editor.pm

 		$doc->assign_file( $file );
 		$doc->editor( Kephra::App::Editor->new( $win ) );
 		Kephra::DocumentStash::add_and_activate( $doc );
-#print "$win $doc $file\n";
 		$main_doc_bar->add_page( $doc->file_name, -1, 1, $doc);
 	}
 	$doc->editor->focus();