@@ -135,6 +135,10 @@ public void actionPerformed(ActionEvent e) {
135
135
private final JosmAction setMaxViewportAction ;
136
136
137
137
private final JMenu markSeenMainMenu ;
138
+ /* following three are stored to be used in the tests */
139
+ private final JMenuItem mainMenuRecordItem ;
140
+ @ SuppressWarnings ("UnusedVariable" ) private final JMenuItem mainMenuClearItem ;
141
+ @ SuppressWarnings ("UnusedVariable" ) private final JMenuItem mainMenuSetMaxViewportItem ;
138
142
139
143
private static final int recordMinZoomMin = 4 ;
140
144
private static final int recordMinZoomMax = 24 ;
@@ -161,12 +165,12 @@ public MarkSeenRoot() {
161
165
162
166
this .markSeenMainMenu = new JMenu (tr ("MarkSeen" ));
163
167
this .markSeenMainMenu .setIcon (new ImageProvider ("icons/16x16/markseen" ).get ());
164
- final JMenuItem mainMenuRecordItem = new JCheckBoxMenuItem (this .recordAction );
168
+ this . mainMenuRecordItem = new JCheckBoxMenuItem (this .recordAction );
165
169
mainMenuRecordItem .setAccelerator (this .recordAction .getShortcut ().getKeyStroke ());
166
- this .recordAction .addButtonModel (mainMenuRecordItem .getModel ());
167
- this .markSeenMainMenu .add (mainMenuRecordItem );
168
- MainMenu .add (this .markSeenMainMenu , this .clearAction , false );
169
- MainMenu .add (this .markSeenMainMenu , this .setMaxViewportAction , false );
170
+ this .recordAction .addButtonModel (this . mainMenuRecordItem .getModel ());
171
+ this .markSeenMainMenu .add (this . mainMenuRecordItem );
172
+ this . mainMenuClearItem = MainMenu .add (this .markSeenMainMenu , this .clearAction , false );
173
+ this . mainMenuSetMaxViewportItem = MainMenu .add (this .markSeenMainMenu , this .setMaxViewportAction , false );
170
174
}
171
175
172
176
public void mapFrameInitialized (MapFrame oldFrame , MapFrame newFrame ) {
0 commit comments