mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-24 23:47:20 +00:00
fix #81
As it was found the issue has been caused by parallel access to QGraphicsScene so it has been cleared before convertion to pixmap. It has been resolved by deletion concurrent updates in this place (it makes sense anyway).
This commit is contained in:
parent
50f3ef5bba
commit
89d573450a
@ -229,10 +229,9 @@ void AWKeys::reinitKeys(const QStringList currentKeys)
|
||||
|
||||
void AWKeys::updateTextData()
|
||||
{
|
||||
QFuture<QString> text = QtConcurrent::run(m_threadPool, [this]() {
|
||||
// do not do it in parallel to avoid race condition
|
||||
calculateValues();
|
||||
return parsePattern(keyOperator->pattern());
|
||||
});
|
||||
QString text = parsePattern(keyOperator->pattern());
|
||||
|
||||
emit(needTextToBeUpdated(text));
|
||||
emit(dataAggregator->updateData(values));
|
||||
|
@ -90,7 +90,6 @@ GraphicalItem *GraphicalItem::copy(const QString _fileName, const int _number)
|
||||
QString GraphicalItem::image(const QVariant &value)
|
||||
{
|
||||
qCDebug(LOG_LIB) << "Value" << value;
|
||||
qDebug() << "Value" << value;
|
||||
|
||||
m_scene->clear();
|
||||
int scale[2] = {1, 1};
|
||||
@ -131,7 +130,6 @@ QString GraphicalItem::image(const QVariant &value)
|
||||
QString url = QString("<img src=\"data:image/png;base64,%1\"/>")
|
||||
.arg(QString(byteArray.toBase64()));
|
||||
|
||||
qDebug() << url;
|
||||
return url;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user