Skip to content

Commit

Permalink
> Fixes image for emptybox in OpenAPI window
Browse files Browse the repository at this point in the history
+ Show message if user don't fill field Scheme URL
  • Loading branch information
trueromanus committed Dec 8, 2023
1 parent 86ea8d9 commit e27d22b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ViewModels/openapiexporterviewmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,14 @@ void OpenApiExporterViewModel::cancelCurrentRequest() noexcept
void OpenApiExporterViewModel::loadOpenApiScheme() noexcept
{
if (m_loading) return;

clearErrorMessage();
if (m_url.isEmpty()) {
m_errorMessage = "To download the diagram, you must fill in the <b>Scheme URL</b> field!";
emit errorMessageChanged();
return;
}

if (m_routes.contains(m_url)) removeLoadedRoutes(m_url);

QNetworkRequest request(m_url);
Expand Down
1 change: 1 addition & 0 deletions src/Views/OpenApiExportWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ ApplicationWindow {
anchors.centerIn: parent
width: 60
height: 60
mipmap: true
source: storagePaths.icons + "emptybox.svg"
}
Text {
Expand Down

0 comments on commit e27d22b

Please sign in to comment.