Skip to content

Commit

Permalink
Merge pull request #55 from cwensley/fix-rip-convert
Browse files Browse the repository at this point in the history
Fix converting RIP from command line on linux
  • Loading branch information
cwensley authored Sep 12, 2022
2 parents 934cfd8 + 9593c5a commit b84785c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Source/Pablo/Handler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public Control ViewerControl
{
get
{
if (viewerControl == null)
if (viewerControl == null && !IsCommandLine)
{
viewerControl = CreateViewerControl();
viewer = viewerControl as IViewer;
Expand Down Expand Up @@ -412,6 +412,8 @@ protected virtual IViewer CreateViewer()
}

public abstract bool CanEdit { get; }

public bool IsCommandLine { get; set; }

public abstract void GenerateRegion(Graphics graphics, Rectangle rectSource, Rectangle rectDest);

Expand Down
2 changes: 2 additions & 0 deletions Source/PabloDraw/CommandHandlers/ConvertCommandLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ public override bool Process(ProcessCommandLineArgs args)
sourceDoc.Info.SetOption(option.ID, val);
}
}
sourceHandler.IsCommandLine = true;

/**
var iters = 300;
var sw2 = new Stopwatch ();
Expand Down

0 comments on commit b84785c

Please sign in to comment.