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:
@ -26,6 +26,7 @@ using zaaReloaded2.Controller;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization.Formatters.Soap;
|
||||
using System.IO;
|
||||
using Microsoft.Office.Interop.Word;
|
||||
|
||||
namespace zaaReloaded2.ViewModels
|
||||
{
|
||||
@ -314,7 +315,12 @@ namespace zaaReloaded2.ViewModels
|
||||
|
||||
bool CanUseSettings()
|
||||
{
|
||||
return LastSelected != null && LastSelected.IsSelected;
|
||||
Selection selection = Globals.ThisAddIn.Application.ActiveWindow.Selection;
|
||||
return LastSelected != null && LastSelected.IsSelected &&
|
||||
(
|
||||
selection.Paragraphs.Count > 1
|
||||
|| (selection.Text.Length > 1 && selection.Text.EndsWith("\r"))
|
||||
);
|
||||
}
|
||||
|
||||
void DoAddSettings()
|
||||
|
Reference in New Issue
Block a user