Skip to content

Commit e9b6244

Browse files
committed
Fix Isotopics by peaks HTML export not showing some axis lines, as well as now using proper path to html template file, and allowing user to select location to save to (on Windows)
1 parent 4d6bb1f commit e9b6244

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

InterSpec_resources/static_text/manual_rel_act_report.tmplt.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@
8282
fill: white;
8383
}
8484

85-
.SpecChart .xaxistitle, .SpecChart .yaxistitle, .SpecChart .yaxis, .SpecChart .xaxis{
86-
/* stroke: black; */
85+
.xaxistitle, .yaxistitle, .yaxis, .yaxislabel, .xaxis, .xaxis > .tick > text, .yaxis > .tick > text {
86+
fill: black;
8787
}
8888

8989

90-
.xaxis > .domain, .yaxis > .domain, .xaxis > .tick > line, .yaxis > .tick, .yaxistick {
91-
/* stroke: black; */
90+
.xaxis > .domain, .yaxis > .domain, .xaxis > .tick > line, .yaxis > .tick > line, .yaxistick {
91+
stroke: black;
9292
}
9393

9494
.xgrid > .tick, .ygrid > .tick{

src/RelActCalcManual.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1721,10 +1721,10 @@ void RelEffSolution::print_html_report( ostream &output_html_file,
17211721

17221722

17231723
auto load_file_contents = []( string filename ) -> string {
1724-
//Wt::WApplication *app = Wt::WApplication::instance();
1725-
//string filepath = app ? app->docRoot() : "InterSpec_resources";
1726-
string filepath = "InterSpec_resources";
1727-
filepath = SpecUtils::append_path(filepath, filename );
1724+
Wt::WApplication *app = Wt::WApplication::instance();
1725+
string filepath = app ? app->docRoot() : string("");
1726+
filepath = SpecUtils::append_path( filepath, "InterSpec_resources" );
1727+
filepath = SpecUtils::append_path( filepath, filename );
17281728

17291729
vector<char> file_data;
17301730
try

src/RelActManualGui.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ class RelActManualReportResource : public Wt::WResource
105105
assert( m_app );
106106
assert( m_tool );
107107
assert( m_interspec );
108+
setTakesUpdateLock( true );
108109
}
109110

110111
virtual ~RelActManualReportResource()
@@ -197,11 +198,11 @@ class RelActManualReportResource : public Wt::WResource
197198
{
198199
cerr << "Error handling request for RelActManualReportResource: " << e.what() << endl;
199200
log("error") << "Error handling request for RelActManualReportResource: " << e.what();
200-
response.out() << "Error creating HTML file: " << e.what()
201+
response.out() << "Error creating HTML file: " << e.what()
201202
<< "\n\nPlease report to InterSpec@sandia.gov.";
202203

203-
//passMessage( "Error getting spectrum file currently being shown",
204-
// "", WarningWidget::WarningMsgHigh );
204+
passMessage( "Error getting spectrum file currently being shown: " + string(e.what()),
205+
WarningWidget::WarningMsgHigh );
205206

206207
response.setStatus(500);
207208
assert( 0 );
@@ -672,23 +673,23 @@ void RelActManualGui::init()
672673
m_downloadHtmlReport = new WAnchor( WLink(m_htmlResource), btndiv );
673674
m_downloadHtmlReport->setTarget( AnchorTarget::TargetNewWindow );
674675
m_downloadHtmlReport->setStyleClass( "LinkBtn DownloadLink CALp" );
675-
m_downloadHtmlReport->setText( "HTML Report" );
676676
#else
677-
m_downloadHtmlReport = new WPushButton( "HTML Report", btndiv );
677+
m_downloadHtmlReport = new WPushButton( btndiv );
678678
m_downloadHtmlReport->setIcon( "InterSpec_resources/images/download_small.svg" );
679+
m_downloadHtmlReport->setLink( WLink( m_htmlResource ) );
679680
m_downloadHtmlReport->setLinkTarget( Wt::TargetNewWindow );
680681
m_downloadHtmlReport->setStyleClass( "LinkBtn DownloadBtn CALp" );
681-
m_downloadHtmlReport->setLink( WLink(m_htmlResource) );
682-
682+
683683
#if( ANDROID )
684684
// Using hacked saving to temporary file in Android, instead of via network download of file.
685685
m_downloadHtmlReport->clicked().connect( std::bind([this](){
686686
android_download_workaround( m_calpResource, "rel_eff.html");
687687
}) );
688688
#endif //ANDROID
689-
690689
#endif
691690

691+
m_downloadHtmlReport->setText( "HTML Report" );
692+
692693
WContainerWidget *nucCol = new WContainerWidget();
693694
nucCol->addStyleClass( "ToolTabTitledColumn RelActNucCol" );
694695

0 commit comments

Comments
 (0)