Changes between Version 17 and Version 18 of Help/Plugin/Scripting/Python


Ignore:
Timestamp:
2022-12-26T23:49:56+01:00 (3 years ago)
Author:
jose1711
Comment:

update showMessageDialog arguments

Legend:

Unmodified
Added
Removed
Modified
  • Help/Plugin/Scripting/Python

    v17 v18  
    2424
    2525    if not(selected_ways) or len(selected_ways)>1:
    26         JOptionPane.showMessageDialog(MainApplication.parent,
     26        JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
    2727                                         "Please select a single way that connects to a roundabout")
    2828    else:
    2929        for way in selected_ways:
    3030            if way.get('oneway') in ['yes', '-1']:
    31                 JOptionPane.showMessageDialog(MainApplication.parent, "This way has oneway tag set")
     31                JOptionPane.showMessageDialog(MainApplication.getMainFrame(), "This way has oneway tag set")
    3232            else:
    3333                node_before = None
     
    7373                            adjacent_node_to_split_on = way.getNodes()[-1]
    7474                if not(common_node) or common_node_becomes_node_before==None:
    75                     JOptionPane.showMessageDialog(MainApplication.parent,
     75                    JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
    7676                                               "Please select a way that connects to a roundabout")
    7777                else:
     
    137137
    138138    if not(selected_ways) or len(selected_ways)>1:
    139         JOptionPane.showMessageDialog(MainApplication.parent, "Please select a single way that connects to a roundabout")
     139        JOptionPane.showMessageDialog(MainApplication.getMainFrame(), "Please select a single way that connects to a roundabout")
    140140    else:
    141141        for way in selected_ways:
    142142            if way.get('oneway') in ['yes', '-1']:
    143                 JOptionPane.showMessageDialog(MainApplication.parent, "This way has oneway tag set")
     143                JOptionPane.showMessageDialog(MainApplication.getMainFrame(), "This way has oneway tag set")
    144144            elif way.get('junction') in ['roundabout']:
    145                 JOptionPane.showMessageDialog(MainApplication.parent, "This way is part of a roundabout")
     145                JOptionPane.showMessageDialog(MainApplication.getMainFrame(), "This way is part of a roundabout")
    146146            else:
    147147                node_before = None
     
    213213
    214214                if not(common_node) or ((parentway.isClosed() and common_node_becomes_node_before==None)):
    215                     JOptionPane.showMessageDialog(MainApplication.parent, "Please select a way that connects to a roundabout")
     215                    JOptionPane.showMessageDialog(MainApplication.getMainFrame(), "Please select a way that connects to a roundabout")
    216216                else:
    217217                    commandsList = []