Skip to content

Commit

Permalink
Fix for working with wacom better
Browse files Browse the repository at this point in the history
  • Loading branch information
azagaya committed Nov 19, 2020
1 parent 966d73f commit 25a2cca
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions hspobrush.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,15 @@ void HSPOBrush::mouseMove(const QPoint &oldPos, const QPoint &newPos) {
QPoint(xmax + radius, ymax + radius));

if (gui->get_specular_enabled())
QtConcurrent::run(m_processor, &ImageProcessor::calculate_specular);
m_processor->specular_counter = 1;
if (gui->get_parallax_enabled())
QtConcurrent::run(m_processor, &ImageProcessor::calculate_parallax);
m_processor->parallax_counter = 1;
if (gui->get_occlussion_enabled())
QtConcurrent::run(m_processor, &ImageProcessor::calculate_occlusion);
if (gui->get_height_enabled())
QtConcurrent::run(m_processor, &ImageProcessor::generate_normal_map, false,
false, false, r);
m_processor->occlussion_counter = 1;
if (gui->get_height_enabled()) {
m_processor->normal_counter = 1;
m_processor->rect_requested = m_processor->rect_requested.united(r);
}
}

void HSPOBrush::mousePress(const QPoint &pos) {
Expand Down Expand Up @@ -399,11 +400,16 @@ void HSPOBrush::mousePress(const QPoint &pos) {
oldOcclussion, auxOcclussion));

QRect r(QPoint(xmin, ymin), QPoint(xmax, ymax));
QtConcurrent::run(m_processor, &ImageProcessor::calculate_specular);
QtConcurrent::run(m_processor, &ImageProcessor::calculate_parallax);
QtConcurrent::run(m_processor, &ImageProcessor::calculate_occlusion);
QtConcurrent::run(m_processor, &ImageProcessor::generate_normal_map, false,
false, false, r);
if (gui->get_specular_enabled())
m_processor->specular_counter = 1;
if (gui->get_parallax_enabled())
m_processor->parallax_counter = 1;
if (gui->get_occlussion_enabled())
m_processor->occlussion_counter = 1;
if (gui->get_height_enabled()) {
m_processor->normal_counter = 1;
m_processor->rect_requested = m_processor->rect_requested.united(r);
}
}

void HSPOBrush::mouseRelease(const QPoint &pos) {}
Expand Down

0 comments on commit 25a2cca

Please # to comment.