def addMarker(self): new_marker = Marker("", self.app.settings) new_marker.setScale(self.app.scaleFactor) self.app.markers.append(new_marker) self.app.marker_data_layout.addWidget(new_marker.getGroupBox()) new_marker.updated.connect(self.app.markerUpdated) label, layout = new_marker.getRow() self.app.marker_control_layout.insertRow(Marker.count() - 1, label, layout) self.btn_remove_marker.setDisabled(False)
def addMarker(self): new_marker = Marker("", self.app.settings) new_marker.setScale(self.app.scaleFactor) self.app.markers.append(new_marker) self.app.marker_data_layout.addWidget(new_marker.get_data_layout()) self.app.marker_frame.adjustSize() new_marker.updated.connect(self.app.markerUpdated) label, layout = new_marker.getRow() self.app.marker_control.layout.insertRow(Marker.count() - 1, label, layout) self.btn_remove_marker.setDisabled(False) if Marker.count() >= 2: self.app.marker_control.check_delta.setDisabled(False)