Prevent running the formatter without appropriate selection.

- VERBESSERT: Formatieren läßt sich nicht mehr starten, ohne daß Labor-Text markiert ist.
This commit is contained in:
Daniel Kraus
2015-08-14 17:04:50 +02:00
parent 7a105d7aad
commit 863dfa071a
5 changed files with 74 additions and 7 deletions

View File

@ -119,7 +119,7 @@ namespace zaaReloaded2.Formatter
/// current position of the cursor).</param>
public void Run()
{
if (!CanRun) throw new InvalidOperationException("No laboratory data to format.");
if (!CanRun) throw new NoLaboratoryDataException("No laboratory data to format.");
CreateParagraphStyle();
_secondaryBuffer.ParagraphStyle = zaaReloaded2.Properties.Settings.Default.ParagraphStyleName;