Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions graf2d/gpad/src/TPad.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5086,7 +5086,7 @@ void TPad::Print(const char *filename, Option_t *option)
if (!title && strstr(opt,"svg")) {
gVirtualPS = (TVirtualPS*)gROOT->GetListOfSpecials()->FindObject(psname);

Bool_t noScreen = kFALSE;
Bool_t noScreen = kFALSE, wasModified = IsModified();
if (!GetCanvas()->IsBatch() && GetCanvas()->GetCanvasID() == -1) {
noScreen = kTRUE;
GetCanvas()->SetBatch(kTRUE);
Expand Down Expand Up @@ -5114,6 +5114,8 @@ void TPad::Print(const char *filename, Option_t *option)
Paint();
if (noScreen)
GetCanvas()->SetBatch(kFALSE);
if (wasModified && !IsBatch())
Modified(kTRUE);

if (!gSystem->AccessPathName(psname))
Info("Print", "SVG file %s has been created", psname.Data());
Expand All @@ -5128,7 +5130,7 @@ void TPad::Print(const char *filename, Option_t *option)
if (!title && (strstr(opt,"tex") || strstr(opt,"Standalone"))) {
gVirtualPS = (TVirtualPS*)gROOT->GetListOfSpecials()->FindObject(psname);

Bool_t noScreen = kFALSE;
Bool_t noScreen = kFALSE, wasModified = IsModified();
if (!GetCanvas()->IsBatch() && GetCanvas()->GetCanvasID() == -1) {
noScreen = kTRUE;
GetCanvas()->SetBatch(kTRUE);
Expand Down Expand Up @@ -5157,7 +5159,10 @@ void TPad::Print(const char *filename, Option_t *option)
gVirtualPS->NewPage();
}
Paint();
if (noScreen) GetCanvas()->SetBatch(kFALSE);
if (noScreen)
GetCanvas()->SetBatch(kFALSE);
if (wasModified && !IsBatch())
Modified(kTRUE);

if (!gSystem->AccessPathName(psname)) {
if (standalone) {
Expand Down Expand Up @@ -5192,7 +5197,7 @@ void TPad::Print(const char *filename, Option_t *option)
if (copen || copenb) mustClose = kFALSE;
if (cclose || ccloseb) mustClose = kTRUE;

Bool_t noScreen = kFALSE;
Bool_t noScreen = kFALSE, wasModified = IsModified();
if (!GetCanvas()->IsBatch() && GetCanvas()->GetCanvasID() == -1) {
noScreen = kTRUE;
GetCanvas()->SetBatch(kTRUE);
Expand Down Expand Up @@ -5283,6 +5288,9 @@ void TPad::Print(const char *filename, Option_t *option)
}
}

if (wasModified && !IsBatch())
Modified(kTRUE);

if (strstr(opt,"Preview"))
gSystem->Exec(TString::Format("epstool --quiet -t6p %s %s", psname.Data(), psname.Data()).Data());
if (strstr(opt,"EmbedFonts")) {
Expand Down
Loading