Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
Spectacle
Commits
c22deff0
Commit
c22deff0
authored
Dec 06, 2021
by
Bharadwaj Raju
📚
Committed by
Nate Graham
Dec 06, 2021
Browse files
Disable Annotate button when there's no image
Clicking it when there's no image crashes Spectacle.
parent
36fb0817
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Gui/KSMainWindow.cpp
View file @
c22deff0
...
...
@@ -394,6 +394,9 @@ void KSMainWindow::setScreenshotAndShow(const QPixmap &pixmap)
mExportMenu
->
imageUpdated
();
setWindowTitle
(
i18nc
(
"@title:window Unsaved Screenshot"
,
"Unsaved[*]"
));
setWindowModified
(
true
);
#ifdef KIMAGEANNOTATOR_FOUND
mAnnotateButton
->
setEnabled
(
true
);
#endif
}
else
{
restoreWindowTitle
();
}
...
...
@@ -538,6 +541,9 @@ void KSMainWindow::screenshotFailed()
showInlineMessage
(
i18n
(
"Could not take a screenshot. Please report this bug here: <a href=
\"
https://bugs.kde.org/enter_bug.cgi?product=Spectacle
\"
>create "
"a spectacle bug</a>"
),
KMessageWidget
::
Warning
);
#ifdef KIMAGEANNOTATOR_FOUND
mAnnotateButton
->
setEnabled
(
false
);
#endif
}
void
KSMainWindow
::
setPlaceholderTextOnLaunch
()
...
...
@@ -610,6 +616,9 @@ void KSMainWindow::restoreWindowTitle()
}
else
{
setPlaceholderTextOnLaunch
();
}
#ifdef KIMAGEANNOTATOR_FOUND
mAnnotateButton
->
setEnabled
(
mKSWidget
->
isScreenshotSet
());
#endif
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment