Empty diamond icon in group with dragged entries.
Popular easy-to-use and secure password manager
Brought to you by:
ronys
When I create a new group and move some existing entries (by dragging) from other group to new one then diamond is still empty. It will fill only when I create a total new entry in new group. I checked this few times. I use 3.29 release on Windows 7 Ultimate SP1 x86.
This is interesting ..I would like to fix this bug..Can you assign it to me ?
Hi nsiapraveen,
Thanks for offering to help - please let me know if you've any questions re the development environment, committing the fix, etc.
Rony
Thank u Ronys ! I have started my work !!
Hello, I am working on the code but would like some help. Can you suggest specific files in the code related to the bug ??
src/ui/Windows/PWTreeCtrl.cpp is where you want to look.
The (empty) diamond is CPWTreeCtrl::(EMPTY_)GROUP
The function called when moving an item is CPWTreeCtrl::MoveItem()
Rony
In the CPWTreeCtrl::MoveItem() even if the CPWTreeCtrl::GROUP is being set as the image for the hitemDrop but the change wont be reflected in the UI. How does the UI get updated?
Problem is here: m_pDbx->IsEmptyGroup(StringX(group)) is returning true for a group when dragged into and false when Adding an Entry happens. Any ideas on where to look to make this become false?
I am working on another bug and may not get enough time for this one...Can you assign this bug to another guy who is willing to work on this one ??
Hi Rony,
I would like to take over from Praveen. The bug is fixed. The call to PWScore::RemoveEmptyGroup had to be made when a drag and drop occurs so that the status of the final group will be removed from list of empty groups in PWScore. This was being called when "Add Entry" was made and was missing during the drag operation.
This addition was in PWTreeCtrl::OnDrop(). This appeared better place to call it than MoveItem which OnDrop calls.
//Added code to make sure that the folder on which drag is performed will
//be removed from the vector of empty groups
PWScore pcore = (PWScore )m_pDbx->GetCore();
StringX sxGroup(GetGroup(hitemDrop));
if (pcore->IsEmptyGroup(sxGroup)) {
pcore->RemoveEmptyGroupWhenDragged(sxGroup);
}
//Where RemoveEmptyGroupWhenDragged is a public function added to access private member //function RemoveEmptyGroup
bool PWScore::RemoveEmptyGroupWhenDragged(const StringX &sxEmptyGroup)
{
return RemoveEmptyGroup(sxEmptyGroup);
}
I dont know how to add this as a patch. Help please!
Thanks. The patch still needs some work - comments sent separately.
Rony
Fix based committed in revision 5040. Thanks!