544cfb9e3c050ef9333286f8d6cd75117605b890,libs/labelDialog.py,LabelDialog,popUp,#LabelDialog#Any#Any#,65
Before Change
self.edit.setText(text)
self.edit.setSelection(0, len(text))
self.edit.setFocus(Qt.PopupFocusReason)
if move:
self.move(QCursor.pos())
return self.edit.text() if self.exec_() else None
def listItemClick(self, tQListWidgetItem):
try:
After Change
if move:
cursor_pos = QCursor.pos()
parent_bottomRight = self.parentWidget().geometry()
max_x = parent_bottomRight.x() + parent_bottomRight.width() - self.sizeHint().width()
max_y = parent_bottomRight.y() + parent_bottomRight.height() - self.sizeHint().height()
max_global = self.parentWidget().mapToGlobal(QPoint(max_x, max_y))
if cursor_pos.x() > max_global.x():
cursor_pos.setX(max_global.x())
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: tzutalin/labelImg
Commit Name: 544cfb9e3c050ef9333286f8d6cd75117605b890
Time: 2020-09-12
Author: 4982550+chrisrapson@users.noreply.github.com
File Name: libs/labelDialog.py
Class Name: LabelDialog
Method Name: popUp
Project Name: matplotlib/matplotlib
Commit Name: 252f4135799027f9ae887e8fd87e3af906187a22
Time: 2018-07-16
Author: anntzer.lee@gmail.com
File Name: lib/matplotlib/backends/backend_qt5agg.py
Class Name: FigureCanvasQTAgg
Method Name: paintEvent
Project Name: HyperGAN/HyperGAN
Commit Name: a1333e84dfd6eb16922b52663060c328073039b2
Time: 2017-06-13
Author: mikkel@255bits.com
File Name: hypergan/generators/resize_conv_generator.py
Class Name: ResizeConvGenerator
Method Name: build