Skip to content
Snippets Groups Projects
Commit 17efce2f authored by felmer's avatar felmer
Browse files

use queryID if specified to identify display settings

SVN: 15529
parent ba2fd024
No related branches found
No related tags found
No related merge requests found
......@@ -96,7 +96,7 @@ public class QueryViewer extends ContentPanel implements IDatabaseModificationOb
}
ReportGeneratedCallback callback =
new ReportGeneratedCallback(viewContext.getCommonViewContext(),
createReportInformationProvider(sqlQueryOrNull),
createReportInformationProvider(queryIdOrNull, sqlQueryOrNull),
createDisplayQueryResultsAction());
if (queryIdOrNull != null)
{
......@@ -119,7 +119,8 @@ public class QueryViewer extends ContentPanel implements IDatabaseModificationOb
queryProvider.update(observedModifications);
}
private IReportInformationProvider createReportInformationProvider(final String sqlQuery)
private IReportInformationProvider createReportInformationProvider(final Long queryIdOrNull,
final String sqlQuery)
{
return new IReportInformationProvider()
{
......@@ -131,6 +132,10 @@ public class QueryViewer extends ContentPanel implements IDatabaseModificationOb
public String getKey()
{
if (queryIdOrNull != null)
{
return Long.toString(queryIdOrNull);
}
return Integer.toString(sqlQuery.hashCode());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment