Ticket #3307: docked.patch
File docked.patch, 1.7 KB (added by , 15 years ago) |
---|
-
src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
166 166 catch (SecurityException e1) { 167 167 System.out.println(tr("Warning: failed to put toggle dialog always on top. Exception was: {0}", e1.toString())); 168 168 } 169 parent.remove(ToggleDialog.this); 169 if (parent != null) { 170 parent.remove(ToggleDialog.this); 171 } 170 172 f.getContentPane().add(ToggleDialog.this); 171 173 f.addWindowListener((winadapter = new WindowAdapter(){ 172 174 @Override public void windowClosing(WindowEvent e) { … … 176 178 177 179 // doLayout() - workaround 178 180 setVisible(false); 179 parent.add(ToggleDialog.this); 181 if (parent != null) { 182 parent.add(ToggleDialog.this); 183 } 180 184 if(Main.pref.getBoolean(action.prefname+".visible")) { 181 185 setVisible(true); 182 186 } … … 203 207 titleBar.setVisible(false); 204 208 205 209 // doLayout() - workaround 206 parent.setVisible(false); 207 parent.setVisible(true); 210 if (parent != null) { 211 parent.setVisible(false); 212 parent.setVisible(true); 213 } 208 214 } 209 215 }; 210 216 sticky.addActionListener(stickyActionListener);