//--------------------------------------------------------------------------- void __fastcall TLocationProfilesDialog::BookmarkButtonClick(TObject * Sender) { TControl * Control = dynamic_cast<TControl *>(Sender); TTreeNode * Node = GetProfilesView(Sender)->Selected; assert(Node); assert(Node->Data); TTreeNode * TargetNode; if (Control->Tag < 0) { TargetNode = Node->getPrevSibling(); assert(TargetNode); } else { TargetNode = Node->getNextSibling(); } BookmarkMove(Sender, Node, TargetNode ? TargetNode : Node->Parent); }
//--------------------------------------------------------------------------- void __fastcall TFrm1010::execBtCancelExecute(TObject *Sender) { TTreeNode *Node; TTreeNode *Prew = NULL; if (CadMenu->State == dsInsert) { Node = TreeMenu->Selected; Prew = Node->getPrevSibling(); if(Prew == NULL) { Prew = Node->GetPrev(); } if (Node) { TreeMenu->Items->Delete(Node); } } CadMenu->Cancel(); pWorkEdition->SetWorkEdition(false,true,AppConfig->Colors->Disabled); HabilitarItens(false); ico_index->Color = AppConfig->Colors->Disabled; if (Prew != NULL) { TreeMenu->Selected = Prew; } }