|
@@ -386,8 +386,10 @@ extension KMToolbarController: KMToolbarViewControllerDelegate {
|
|
|
}
|
|
|
|
|
|
func toolbarViewController(_ viewController: KMToolbarViewController, clickMode toolMode: KMToolbarViewType, toolbar toolbarItem: KMToolBoxItem) {
|
|
|
- if toolMode != .Magnify && toolMode != .Move && toolMode != .Select && toolMode != .SelectZoom && toolMode != .LeftPanel && toolMode != .RightPanel {
|
|
|
+ if self.lastItemBox != nil {
|
|
|
self.lastItemBox.isSelected = false
|
|
|
+ }
|
|
|
+ if toolMode != .Magnify && toolMode != .Move && toolMode != .Select && toolMode != .SelectZoom && toolMode != .LeftPanel && toolMode != .RightPanel {
|
|
|
if(toolMode == self.toolbarType) {
|
|
|
toolbarItem.isSelected = false
|
|
|
} else {
|
|
@@ -395,7 +397,7 @@ extension KMToolbarController: KMToolbarViewControllerDelegate {
|
|
|
self.lastItemBox = toolbarItem
|
|
|
}
|
|
|
} else {
|
|
|
- if(toolMode != self.toolbarType) {
|
|
|
+ if(toolMode != self.toolbarType && toolMode != .LeftPanel) {
|
|
|
let item : KMToolBoxItem = (self.mainToolBarView?.toolbarItemFindItemIdentifiers(value: KMDocumentAnnotationToolbarItemIdentifier))!
|
|
|
item.isSelected = true
|
|
|
self.lastItemBox = item
|