Commits

Herbert Breunung  committed be66bd4

focus::maxsize is now getter/setter

  • Participants
  • Parent commits 22e6b47

Comments (0)

Files changed (1)

File lib/Kephra/App/Focus.pm

 	stay();
 }
 
-sub stay {                              # reset focus to current entry
+sub stay {                              # reset focus to current (last set) entry
 	my ($widget) = get();
 	Kephra::App::Util::is_widget($widget)
 		? Wx::Window::SetFocus( $widget )
 		: Kephra::Log::warning( "no widget to stay focussed on", 1 );
 }
 
-sub set_max_size { $max_size = shift }  # set maximum number of memorized widgets in focus
+sub max_size {                          # get and set maximum number of memorized widgets in focus
+	my $new_size = shift;
+	$max_size = defined $new_size ? $new_size : $max_size;
+}
 
 1;