Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions orangecontrib/spectroscopy/widgets/owspectra.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import random
import time
import warnings
from functools import partial
from xml.sax.saxutils import escape

try:
Expand All @@ -17,7 +18,7 @@
QShortcut, QToolTip, QGraphicsRectItem, QGraphicsTextItem
from AnyQt.QtGui import QColor, QPixmapCache, QPen, QKeySequence, QFontDatabase, \
QPalette
from AnyQt.QtCore import Qt, QRectF, QPointF, QObject
from AnyQt.QtCore import Qt, QRectF, QPointF, QObject, QTimer
from AnyQt.QtCore import pyqtSignal

import bottleneck
Expand Down Expand Up @@ -139,7 +140,8 @@ def set_limits(**args):
def set_line_width(**args):
if self.LINE_WIDTH_LABEL in args:
lw = args[self.LINE_WIDTH_LABEL]
self.master.set_line_width(lw)
# wait some time so Qt can process mouseRelease event (and not do double changes)
QTimer.singleShot(100, partial(self.master.set_line_width, lw))

self._setters[self.SPECTRA_BOX] = {self.LINE_WIDTH_LABEL: set_line_width}

Expand Down
Loading