my $layer = Champlain::SelectionLayer->new();
isa_ok($layer, 'Champlain::Layer');
- is($layer->get_selection_mode, 'multiple');
- is($layer->get('selection_mode'), 'multiple');
+ is($layer->get_selection_mode, 'single');
+ is($layer->get('selection_mode'), 'single');
is($layer->get_selected, undef, "[empty] get_selected()");
my $layer = Champlain::SelectionLayer->new();
isa_ok($layer, 'Champlain::Layer');
- is($layer->get_selection_mode, 'multiple');
- is($layer->get('selection_mode'), 'multiple');
- $layer->set_selection_mode('single');
is($layer->get_selection_mode, 'single');
is($layer->get('selection_mode'), 'single');
+ $layer->set_selection_mode('multiple');
+ is($layer->get_selection_mode, 'multiple');
+ is($layer->get('selection_mode'), 'multiple');
is($layer->get_selected, undef, "[empty] get_selected()");
sub test_markers_multiple {
my $layer = Champlain::SelectionLayer->new();
isa_ok($layer, 'Champlain::Layer');
+ $layer->set_selection_mode('multiple');
my @layer_markers = (
my $layer = Champlain::SelectionLayer->new();
isa_ok($layer, 'Champlain::Layer');
+ # In the past the default selection mode was multiple, so we set it back to
+ # single just like in the old times
+ $layer->set_selection_mode('multiple');
+
my $notify = 0;
$layer->signal_connect('notify::selection-mode', sub {
++$notify;