File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
src/org/openstreetmap/josm/gui/dialogs Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -195,20 +195,27 @@ public PopupMenuHandler getPopupMenuHandler() {
195195 * Launches a conflict resolution dialog for the first selected conflict
196196 */
197197 private void resolve () {
198+ final ConflictResolutionDialog dialog ;
199+ int index ;
198200 synchronized (this ) {
199201 if (conflicts == null || model .getSize () == 0 )
200202 return ;
201203
202- int index = lstConflicts .getSelectedIndex ();
204+ index = lstConflicts .getSelectedIndex ();
203205 if (index < 0 ) {
204206 index = 0 ;
205207 }
206208
207209 Conflict <? extends OsmPrimitive > c = conflicts .get (index );
208- ConflictResolutionDialog dialog = new ConflictResolutionDialog (MainApplication .getMainFrame ());
210+ dialog = new ConflictResolutionDialog (MainApplication .getMainFrame ());
209211 dialog .getConflictResolver ().populate (c );
210- dialog .showDialog ();
211-
212+ }
213+ // This must not be synchronized. See #23079.
214+ // On macOS, under some instances, the AppKit thread may want to lock this (`ConflictDialog`) in order to add a
215+ // property change listener. This dialog currently locks the UI thread, so it *should* be safe to have outside
216+ // of the synchronized lock.
217+ dialog .showDialog ();
218+ synchronized (this ) {
212219 if (index < conflicts .size () - 1 ) {
213220 lstConflicts .setSelectedIndex (index );
214221 } else {
You can’t perform that action at this time.
0 commit comments