Merge pull request #43 from gdzhu/gdzhu/skip_overlay_when_not_specified

skip overlay processing when no overlay is specified
This commit is contained in:
Manuel Dewald
2021-09-06 16:20:46 +02:00
committed by GitHub
2 changed files with 7 additions and 2 deletions

View File

@@ -155,9 +155,14 @@ int main(int argc, char *argv[])
std::cout << "Rotation Time: " << rotationSeconds << std::endl;
std::cout << "Overlay input: " << overlay << std::endl;
}
Overlay o(overlay);
o.setDebugMode(debugMode);
if (!overlay.empty())
{
w.setOverlay(&o);
}
w.setAspect(aspect);
w.setDebugMode(debugMode);
w.setFitAspectAxisToWindow(fitAspectAxisToWindow);

View File

@@ -41,7 +41,7 @@ private:
bool fitAspectAxisToWindow = false;
QString overlayHexRGB;
Overlay* overlay;
Overlay* overlay = NULL;
void drawText(QPixmap& image, int margin, int fontsize, QString text, int alignment);